mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user