Skip to content

Commit

Permalink
Make ZString print natively with %s.
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Sep 4, 2023
1 parent fe0ae4a commit 53598b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/std/io/formatter.c3
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ fn usz! Formatter.out_str(&self, any arg) @private
case FUNC:
return self.out_substr("<function>");
case DISTINCT:
if (arg.type == ZString.typeid)
{
return self.out_substr(((ZString*)arg).as_str());
}
if (arg.type == DString.typeid)
{
return self.out_substr(((DString*)arg).as_str());
Expand Down

0 comments on commit 53598b8

Please sign in to comment.