std/lib/core: rename DString.str to DString.as_str (#834)

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
Pierre Curto
2023-07-08 00:10:04 +02:00
committed by GitHub
parent 8780df8467
commit d709c18f5f
11 changed files with 20 additions and 20 deletions

View File

@@ -21,7 +21,7 @@ struct StringData @private
fn void Summary.print(Summary *s, File out)
{
String title = s.title ? s.title.str() : "missing";
String title = s.title ? s.title.as_str() : "missing";
out.printf("Summary({ .title = %s, .ok = %s})", title, s.ok);
}
@@ -128,7 +128,7 @@ fn void main()
io::printf(" Summary: ");
summary.print(io::stdout());
io::printn("");
String title_sure = summary.title ? summary.title.str() : "";
String title_sure = summary.title ? summary.title.as_str() : "";
io::printf(" Title: %s\n", title_sure);
bool! has_title = readWhetherTitleNonEmpty(url);
// This looks a bit less than elegant, but as you see it's mostly due to having to

View File

@@ -18,7 +18,7 @@ fn void main(String[] args)
defer s.free();
// Grab the string as a slice.
String numbers = s.str();
String numbers = s.as_str();
// Track our current value
int val = 0;