- Subject: Re: bskip_chars("...\\") -> Unfinished escape sequence
 
- From: p.boekholt@xxxxxxxxx
 
- Date: Mon, 21 Feb 2005 11:51:49 +0100
 
On Mon, 21 Feb 2005 10:53:02 +0100, SANGOI DINO <SANGOID@xxxxxxxxxxxxxxxxx> said:
> The most common usage is using the return values of string_match_nth() as
> array indexes on a string, like:
That's why there's a string_get_match() function in strutils.sl that does
this.
> But reading the latest slang documentation, I can't find a reference to what
> type s[x] has (if 's' is of String_Type). If it is byte-indexed, s[[4:10]]
> may be a invalid utf-8 string, but if it is char-indexed, you can't use the
> values from string_match_nth() to index a string.
It's in the tm documentation for substr():
NOTES
   In many cases it is more convenient to use array indexing rather
   than the `substr' function.  In fact, if UTF-8 mode is not in
   effect, `substr(s,i+1,strlen(s))' is equivalent to
   `s[[i:]]'.  Array indexing uses byte-semantics, not character
   semantics assumed by the `substr' function.
String_get_match() uses substr(), so it should be all right.
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
  [2005 date index]
  [2005 thread index]
  
  [Thread Prev] [Thread Next]
      
  [Date Prev] [Date Next]