(core::str) mostly rename len -> len_chars
This commit is contained in:
parent
7a6498668f
commit
98447f5236
17 changed files with 54 additions and 52 deletions
|
@ -174,10 +174,10 @@ fn print(s: str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rest(s: str, start: uint) -> str {
|
fn rest(s: str, start: uint) -> str {
|
||||||
if (start >= str::len(s)) {
|
if (start >= str::len_chars(s)) {
|
||||||
""
|
""
|
||||||
} else {
|
} else {
|
||||||
str::slice(s, start, str::len(s))
|
str::slice(s, start, str::len_chars(s))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -689,7 +689,7 @@ fn cmd_install(c: cargo) unsafe {
|
||||||
alt str::index(uuid, '/') {
|
alt str::index(uuid, '/') {
|
||||||
option::some(idx) {
|
option::some(idx) {
|
||||||
let source = str::slice(uuid, 0u, idx);
|
let source = str::slice(uuid, 0u, idx);
|
||||||
uuid = str::slice(uuid, idx + 1u, str::len(uuid));
|
uuid = str::slice(uuid, idx + 1u, str::len_chars(uuid));
|
||||||
install_uuid_specific(c, wd, source, uuid);
|
install_uuid_specific(c, wd, source, uuid);
|
||||||
}
|
}
|
||||||
option::none {
|
option::none {
|
||||||
|
@ -701,7 +701,7 @@ fn cmd_install(c: cargo) unsafe {
|
||||||
alt str::index(name, '/') {
|
alt str::index(name, '/') {
|
||||||
option::some(idx) {
|
option::some(idx) {
|
||||||
let source = str::slice(name, 0u, idx);
|
let source = str::slice(name, 0u, idx);
|
||||||
name = str::slice(name, idx + 1u, str::len(name));
|
name = str::slice(name, idx + 1u, str::len_chars(name));
|
||||||
install_named_specific(c, wd, source, name);
|
install_named_specific(c, wd, source, name);
|
||||||
}
|
}
|
||||||
option::none {
|
option::none {
|
||||||
|
|
|
@ -210,7 +210,7 @@ fn highlight_lines(cm: codemap::codemap, sp: span,
|
||||||
if elided {
|
if elided {
|
||||||
let last_line = display_lines[vec::len(display_lines) - 1u];
|
let last_line = display_lines[vec::len(display_lines) - 1u];
|
||||||
let s = #fmt["%s:%u ", fm.name, last_line + 1u];
|
let s = #fmt["%s:%u ", fm.name, last_line + 1u];
|
||||||
let indent = str::len(s);
|
let indent = str::len_bytes(s);
|
||||||
let out = "";
|
let out = "";
|
||||||
while indent > 0u { out += " "; indent -= 1u; }
|
while indent > 0u { out += " "; indent -= 1u; }
|
||||||
out += "...\n";
|
out += "...\n";
|
||||||
|
@ -228,7 +228,7 @@ fn highlight_lines(cm: codemap::codemap, sp: span,
|
||||||
while num > 0u { num /= 10u; digits += 1u; }
|
while num > 0u { num /= 10u; digits += 1u; }
|
||||||
|
|
||||||
// indent past |name:## | and the 0-offset column location
|
// indent past |name:## | and the 0-offset column location
|
||||||
let left = str::len(fm.name) + digits + lo.col + 3u;
|
let left = str::len_bytes(fm.name) + digits + lo.col + 3u;
|
||||||
let s = "";
|
let s = "";
|
||||||
while left > 0u { str::push_char(s, ' '); left -= 1u; }
|
while left > 0u { str::push_char(s, ' '); left -= 1u; }
|
||||||
|
|
||||||
|
|
|
@ -158,9 +158,9 @@ fn span_to_lines(sp: span, cm: codemap::codemap) -> @file_lines {
|
||||||
fn get_line(fm: filemap, line: int) -> str unsafe {
|
fn get_line(fm: filemap, line: int) -> str unsafe {
|
||||||
let begin: uint = fm.lines[line].byte - fm.start_pos.byte;
|
let begin: uint = fm.lines[line].byte - fm.start_pos.byte;
|
||||||
let end = alt str::byte_index_from(*fm.src, '\n' as u8, begin,
|
let end = alt str::byte_index_from(*fm.src, '\n' as u8, begin,
|
||||||
str::len(*fm.src)) {
|
str::len_bytes(*fm.src)) {
|
||||||
some(e) { e }
|
some(e) { e }
|
||||||
none { str::len(*fm.src) }
|
none { str::len_bytes(*fm.src) }
|
||||||
};
|
};
|
||||||
str::unsafe::slice_bytes(*fm.src, begin, end)
|
str::unsafe::slice_bytes(*fm.src, begin, end)
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,7 +214,7 @@ fn finish<T: qq_helper>
|
||||||
if (j < g_len && i == cx.gather[j].lo) {
|
if (j < g_len && i == cx.gather[j].lo) {
|
||||||
assert ch == '$';
|
assert ch == '$';
|
||||||
let repl = #fmt("$%u ", j);
|
let repl = #fmt("$%u ", j);
|
||||||
state = skip(str::len(repl));
|
state = skip(str::len_chars(repl));
|
||||||
str2 += repl;
|
str2 += repl;
|
||||||
}
|
}
|
||||||
alt state {
|
alt state {
|
||||||
|
|
|
@ -491,7 +491,7 @@ fn end(p: printer) { p.pretty_print(END); }
|
||||||
fn eof(p: printer) { p.pretty_print(EOF); }
|
fn eof(p: printer) { p.pretty_print(EOF); }
|
||||||
|
|
||||||
fn word(p: printer, wrd: str) {
|
fn word(p: printer, wrd: str) {
|
||||||
p.pretty_print(STRING(wrd, str::len(wrd) as int));
|
p.pretty_print(STRING(wrd, str::len_bytes(wrd) as int));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn huge_word(p: printer, wrd: str) {
|
fn huge_word(p: printer, wrd: str) {
|
||||||
|
|
|
@ -204,7 +204,7 @@ fn head(s: ps, w: str) {
|
||||||
// outer-box is consistent
|
// outer-box is consistent
|
||||||
cbox(s, indent_unit);
|
cbox(s, indent_unit);
|
||||||
// head-box is inconsistent
|
// head-box is inconsistent
|
||||||
ibox(s, str::len(w) + 1u);
|
ibox(s, str::len_bytes(w) + 1u);
|
||||||
// keyword that starts the head
|
// keyword that starts the head
|
||||||
word_nbsp(s, w);
|
word_nbsp(s, w);
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,7 @@ fn check_variants_T<T: copy>(
|
||||||
|
|
||||||
fn last_part(filename: str) -> str {
|
fn last_part(filename: str) -> str {
|
||||||
let ix = option::get(str::rindex(filename, '/'));
|
let ix = option::get(str::rindex(filename, '/'));
|
||||||
str::slice(filename, ix + 1u, str::len(filename) - 3u)
|
str::slice(filename, ix + 1u, str::len_chars(filename) - 3u)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum happiness { passed, cleanly_rejected(str), known_bug(str), failed(str), }
|
enum happiness { passed, cleanly_rejected(str), known_bug(str), failed(str), }
|
||||||
|
|
|
@ -325,7 +325,7 @@ mod rt {
|
||||||
alt cv.precision {
|
alt cv.precision {
|
||||||
count_implied { s }
|
count_implied { s }
|
||||||
count_is(max) {
|
count_is(max) {
|
||||||
if max as uint < str::len(s) {
|
if max as uint < str::len_chars(s) {
|
||||||
str::substr(s, 0u, max as uint)
|
str::substr(s, 0u, max as uint)
|
||||||
} else { s }
|
} else { s }
|
||||||
}
|
}
|
||||||
|
@ -368,7 +368,7 @@ mod rt {
|
||||||
""
|
""
|
||||||
} else {
|
} else {
|
||||||
let s = uint::to_str(num, radix);
|
let s = uint::to_str(num, radix);
|
||||||
let len = str::len(s);
|
let len = str::len_chars(s);
|
||||||
if len < prec {
|
if len < prec {
|
||||||
let diff = prec - len;
|
let diff = prec - len;
|
||||||
let pad = str_init_elt(diff, '0');
|
let pad = str_init_elt(diff, '0');
|
||||||
|
@ -400,7 +400,7 @@ mod rt {
|
||||||
uwidth = width as uint;
|
uwidth = width as uint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let strlen = str::len(s);
|
let strlen = str::len_chars(s);
|
||||||
if uwidth <= strlen { ret s; }
|
if uwidth <= strlen { ret s; }
|
||||||
let padchar = ' ';
|
let padchar = ' ';
|
||||||
let diff = uwidth - strlen;
|
let diff = uwidth - strlen;
|
||||||
|
|
|
@ -86,7 +86,7 @@ export
|
||||||
is_not_empty,
|
is_not_empty,
|
||||||
is_whitespace,
|
is_whitespace,
|
||||||
len_bytes,
|
len_bytes,
|
||||||
len_chars, len,
|
len_chars, //len,
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
// FIXME: perhaps some more of this section shouldn't be exported?
|
// FIXME: perhaps some more of this section shouldn't be exported?
|
||||||
|
@ -529,7 +529,7 @@ fn split(ss: str, sepfn: fn(cc: char)->bool) -> [str] {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if len(accum) >= 0u || ends_with_sep {
|
if len_chars(accum) >= 0u || ends_with_sep {
|
||||||
vv += [accum];
|
vv += [accum];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -601,7 +601,7 @@ separated by whitespace
|
||||||
*/
|
*/
|
||||||
fn words(ss: str) -> [str] {
|
fn words(ss: str) -> [str] {
|
||||||
ret vec::filter( split(ss, {|cc| char::is_whitespace(cc)}),
|
ret vec::filter( split(ss, {|cc| char::is_whitespace(cc)}),
|
||||||
{|w| 0u < str::len(w)});
|
{|w| 0u < str::len_chars(w)});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -611,7 +611,7 @@ Create a vector of substrings of size `nn`
|
||||||
*/
|
*/
|
||||||
fn windowed(nn: uint, ss: str) -> [str] {
|
fn windowed(nn: uint, ss: str) -> [str] {
|
||||||
let ww = [];
|
let ww = [];
|
||||||
let len = str::len(ss);
|
let len = str::len_chars(ss);
|
||||||
|
|
||||||
assert 1u <= nn;
|
assert 1u <= nn;
|
||||||
|
|
||||||
|
@ -883,7 +883,7 @@ fn byte_index_from(s: str, b: u8, start: uint, end: uint) -> option<uint> {
|
||||||
// (as option some/none)
|
// (as option some/none)
|
||||||
fn rindex(ss: str, cc: char) -> option<uint> {
|
fn rindex(ss: str, cc: char) -> option<uint> {
|
||||||
let bii = len_bytes(ss);
|
let bii = len_bytes(ss);
|
||||||
let cii = len(ss);
|
let cii = len_chars(ss);
|
||||||
while bii > 0u {
|
while bii > 0u {
|
||||||
let {ch, prev} = char_range_at_reverse(ss, bii);
|
let {ch, prev} = char_range_at_reverse(ss, bii);
|
||||||
cii -= 1u;
|
cii -= 1u;
|
||||||
|
@ -1008,8 +1008,8 @@ haystack - The string to look in
|
||||||
needle - The string to look for
|
needle - The string to look for
|
||||||
*/
|
*/
|
||||||
fn ends_with(haystack: str, needle: str) -> bool {
|
fn ends_with(haystack: str, needle: str) -> bool {
|
||||||
let haystack_len: uint = len(haystack);
|
let haystack_len: uint = len_chars(haystack);
|
||||||
let needle_len: uint = len(needle);
|
let needle_len: uint = len_chars(needle);
|
||||||
ret if needle_len == 0u {
|
ret if needle_len == 0u {
|
||||||
true
|
true
|
||||||
} else if needle_len > haystack_len {
|
} else if needle_len > haystack_len {
|
||||||
|
@ -1079,7 +1079,9 @@ fn len(s: str) -> uint {
|
||||||
substr_len_chars(s, 0u, len_bytes(s))
|
substr_len_chars(s, 0u, len_bytes(s))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn len_chars(s: str) -> uint { len(s) }
|
fn len_chars(s: str) -> uint {
|
||||||
|
substr_len_chars(s, 0u, len_bytes(s))
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Section: Misc
|
Section: Misc
|
||||||
|
@ -1529,14 +1531,14 @@ mod tests {
|
||||||
assert (len_bytes("\u2620") == 3u);
|
assert (len_bytes("\u2620") == 3u);
|
||||||
assert (len_bytes("\U0001d11e") == 4u);
|
assert (len_bytes("\U0001d11e") == 4u);
|
||||||
|
|
||||||
assert (len("") == 0u);
|
assert (len_chars("") == 0u);
|
||||||
assert (len("hello world") == 11u);
|
assert (len_chars("hello world") == 11u);
|
||||||
assert (len("\x63") == 1u);
|
assert (len_chars("\x63") == 1u);
|
||||||
assert (len("\xa2") == 1u);
|
assert (len_chars("\xa2") == 1u);
|
||||||
assert (len("\u03c0") == 1u);
|
assert (len_chars("\u03c0") == 1u);
|
||||||
assert (len("\u2620") == 1u);
|
assert (len_chars("\u2620") == 1u);
|
||||||
assert (len("\U0001d11e") == 1u);
|
assert (len_chars("\U0001d11e") == 1u);
|
||||||
assert (len("ประเทศไทย中华Việt Nam") == 19u);
|
assert (len_chars("ประเทศไทย中华Việt Nam") == 19u);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -45,7 +45,7 @@ fn splitDirnameBasename (pp: path) -> {dirname: str, basename: str} {
|
||||||
}
|
}
|
||||||
|
|
||||||
ret {dirname: str::slice(pp, 0u, ii),
|
ret {dirname: str::slice(pp, 0u, ii),
|
||||||
basename: str::slice(pp, ii + 1u, str::len(pp))};
|
basename: str::slice(pp, ii + 1u, str::len_chars(pp))};
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -79,7 +79,7 @@ A description of a possible option
|
||||||
type opt = {name: name, hasarg: hasarg, occur: occur};
|
type opt = {name: name, hasarg: hasarg, occur: occur};
|
||||||
|
|
||||||
fn mkname(nm: str) -> name {
|
fn mkname(nm: str) -> name {
|
||||||
ret if str::len(nm) == 1u {
|
ret if str::len_bytes(nm) == 1u {
|
||||||
short(str::char_at(nm, 0u))
|
short(str::char_at(nm, 0u))
|
||||||
} else { long(nm) };
|
} else { long(nm) };
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,8 +70,8 @@ fn to_str(j: json) -> str {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rest(s: str) -> str {
|
fn rest(s: str) -> str {
|
||||||
assert(str::len(s) >= 1u);
|
assert(str::len_chars(s) >= 1u);
|
||||||
str::slice(s, 1u, str::len(s))
|
str::slice(s, 1u, str::len_chars(s))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn from_str_str(s: str) -> (option<json>, str) {
|
fn from_str_str(s: str) -> (option<json>, str) {
|
||||||
|
@ -99,7 +99,7 @@ fn from_str_str(s: str) -> (option<json>, str) {
|
||||||
cont;
|
cont;
|
||||||
} else if (c == '"') {
|
} else if (c == '"') {
|
||||||
ret (some(string(res)),
|
ret (some(string(res)),
|
||||||
str::slice(s, pos, str::len(s)));
|
str::slice(s, pos, str::len_chars(s)));
|
||||||
}
|
}
|
||||||
res = res + str::from_char(c);
|
res = res + str::from_char(c);
|
||||||
}
|
}
|
||||||
|
@ -200,12 +200,12 @@ fn from_str_float(s: str) -> (option<json>, str) {
|
||||||
}
|
}
|
||||||
'.' { break; }
|
'.' { break; }
|
||||||
_ { ret (some(num(neg * res)),
|
_ { ret (some(num(neg * res)),
|
||||||
str::slice(s, opos, str::len(s))); }
|
str::slice(s, opos, str::len_chars(s))); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if pos == len {
|
if pos == len {
|
||||||
ret (some(num(neg * res)), str::slice(s, pos, str::len(s)));
|
ret (some(num(neg * res)), str::slice(s, pos, str::len_chars(s)));
|
||||||
}
|
}
|
||||||
|
|
||||||
let dec = 1f;
|
let dec = 1f;
|
||||||
|
@ -220,17 +220,17 @@ fn from_str_float(s: str) -> (option<json>, str) {
|
||||||
res += (((c as int) - ('0' as int)) as float) * dec;
|
res += (((c as int) - ('0' as int)) as float) * dec;
|
||||||
}
|
}
|
||||||
_ { ret (some(num(neg * res)),
|
_ { ret (some(num(neg * res)),
|
||||||
str::slice(s, opos, str::len(s))); }
|
str::slice(s, opos, str::len_chars(s))); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret (some(num(neg * res)), str::slice(s, pos, str::len(s)));
|
ret (some(num(neg * res)), str::slice(s, pos, str::len_chars(s)));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn from_str_bool(s: str) -> (option<json>, str) {
|
fn from_str_bool(s: str) -> (option<json>, str) {
|
||||||
if (str::starts_with(s, "true")) {
|
if (str::starts_with(s, "true")) {
|
||||||
(some(boolean(true)), str::slice(s, 4u, str::len(s)))
|
(some(boolean(true)), str::slice(s, 4u, str::len_chars(s)))
|
||||||
} else if (str::starts_with(s, "false")) {
|
} else if (str::starts_with(s, "false")) {
|
||||||
(some(boolean(false)), str::slice(s, 5u, str::len(s)))
|
(some(boolean(false)), str::slice(s, 5u, str::len_chars(s)))
|
||||||
} else {
|
} else {
|
||||||
(none, s)
|
(none, s)
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ fn from_str_bool(s: str) -> (option<json>, str) {
|
||||||
|
|
||||||
fn from_str_null(s: str) -> (option<json>, str) {
|
fn from_str_null(s: str) -> (option<json>, str) {
|
||||||
if (str::starts_with(s, "null")) {
|
if (str::starts_with(s, "null")) {
|
||||||
(some(null), str::slice(s, 4u, str::len(s)))
|
(some(null), str::slice(s, 4u, str::len_chars(s)))
|
||||||
} else {
|
} else {
|
||||||
(none, s)
|
(none, s)
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ fn mk_rng() -> rng {
|
||||||
let i = 0u;
|
let i = 0u;
|
||||||
while (i < len) {
|
while (i < len) {
|
||||||
let n = rustrt::rand_next(**self) as uint %
|
let n = rustrt::rand_next(**self) as uint %
|
||||||
str::len(charset);
|
str::len_bytes(charset);
|
||||||
s = s + str::from_char(str::char_at(charset, n));
|
s = s + str::from_char(str::char_at(charset, n));
|
||||||
i += 1u;
|
i += 1u;
|
||||||
}
|
}
|
||||||
|
@ -130,8 +130,8 @@ mod tests {
|
||||||
log(debug, r.gen_str(10u));
|
log(debug, r.gen_str(10u));
|
||||||
log(debug, r.gen_str(10u));
|
log(debug, r.gen_str(10u));
|
||||||
log(debug, r.gen_str(10u));
|
log(debug, r.gen_str(10u));
|
||||||
assert(str::len(r.gen_str(10u)) == 10u);
|
assert(str::len_bytes(r.gen_str(10u)) == 10u);
|
||||||
assert(str::len(r.gen_str(16u)) == 16u);
|
assert(str::len_bytes(r.gen_str(16u)) == 16u);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1373,7 +1373,7 @@ mod tests {
|
||||||
let sample = @"0123456789ABCDE";
|
let sample = @"0123456789ABCDE";
|
||||||
let r = of_str(sample);
|
let r = of_str(sample);
|
||||||
|
|
||||||
assert char_len(r) == str::len(*sample);
|
assert char_len(r) == str::len_chars(*sample);
|
||||||
assert rope_to_string(r) == *sample;
|
assert rope_to_string(r) == *sample;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1384,7 +1384,7 @@ mod tests {
|
||||||
while i < 10 { *buf = *buf + *buf; i+=1;}
|
while i < 10 { *buf = *buf + *buf; i+=1;}
|
||||||
let sample = @*buf;
|
let sample = @*buf;
|
||||||
let r = of_str(sample);
|
let r = of_str(sample);
|
||||||
assert char_len(r) == str::len(*sample);
|
assert char_len(r) == str::len_chars(*sample);
|
||||||
assert rope_to_string(r) == *sample;
|
assert rope_to_string(r) == *sample;
|
||||||
|
|
||||||
let string_iter = 0u;
|
let string_iter = 0u;
|
||||||
|
@ -1427,7 +1427,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert len == str::len(*sample);
|
assert len == str::len_chars(*sample);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -175,7 +175,7 @@ fn parse_desc(desc: str) -> (option<str>, option<str>) {
|
||||||
|
|
||||||
if check vec::is_not_empty(paras) {
|
if check vec::is_not_empty(paras) {
|
||||||
let maybe_brief = vec::head(paras);
|
let maybe_brief = vec::head(paras);
|
||||||
if str::len(maybe_brief) <= max_brief_len {
|
if str::len_bytes(maybe_brief) <= max_brief_len {
|
||||||
let desc_paras = vec::tail(paras);
|
let desc_paras = vec::tail(paras);
|
||||||
let desc = if vec::is_not_empty(desc_paras) {
|
let desc = if vec::is_not_empty(desc_paras) {
|
||||||
some(str::connect(desc_paras, "\n\n"))
|
some(str::connect(desc_paras, "\n\n"))
|
||||||
|
|
|
@ -68,7 +68,7 @@ fn unindent(s: str) -> str {
|
||||||
line
|
line
|
||||||
} else {
|
} else {
|
||||||
assert str::len_bytes(line) >= min_indent;
|
assert str::len_bytes(line) >= min_indent;
|
||||||
str::slice(line, min_indent, str::len(line))
|
str::slice(line, min_indent, str::len_chars(line))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
str::connect(unindented, "\n")
|
str::connect(unindented, "\n")
|
||||||
|
|
|
@ -8,7 +8,7 @@ fn main() {
|
||||||
let s: str = str::from_chars(chs);
|
let s: str = str::from_chars(chs);
|
||||||
|
|
||||||
assert (str::len_bytes(s) == 10u);
|
assert (str::len_bytes(s) == 10u);
|
||||||
assert (str::len(s) == 4u);
|
assert (str::len_chars(s) == 4u);
|
||||||
assert (vec::len::<char>(str::chars(s)) == 4u);
|
assert (vec::len::<char>(str::chars(s)) == 4u);
|
||||||
assert (str::eq(str::from_chars(str::chars(s)), s));
|
assert (str::eq(str::from_chars(str::chars(s)), s));
|
||||||
assert (str::char_at(s, 0u) == 'e');
|
assert (str::char_at(s, 0u) == 'e');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue