You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If s=hello, s[0] is h, s[-1] is o, and s[1:4] is ell.
For strings containing multi-byte codepoints, we can copy Julia, i.e.
Indexing yields codepoints instead of bytes.
Indices are byte indices.
For instance, if s=你好 (Chinese codepoints occupy 3 bytes in UTF-8), s[0] is 你, s[3] is 好. Indexing at other indices throws an error.
We need to give up the current behavior of string indexing. Right now s[a b] is equivalent to (s a b). I suppose that one syntax for command substitution is enough.
The text was updated successfully, but these errors were encountered:
If
s=hello
,s[0]
ish
,s[-1]
iso
, ands[1:4]
isell
.For strings containing multi-byte codepoints, we can copy Julia, i.e.
For instance, if
s=你好
(Chinese codepoints occupy 3 bytes in UTF-8),s[0]
is你
,s[3]
is好
. Indexing at other indices throws an error.We need to give up the current behavior of string indexing. Right now
s[a b]
is equivalent to(s a b)
. I suppose that one syntax for command substitution is enough.The text was updated successfully, but these errors were encountered: