Skip to content

Commit

Permalink
add suggestion by @ConnorGray
Browse files Browse the repository at this point in the history
Signed-off-by: martinvuyk <[email protected]>
  • Loading branch information
martinvuyk committed Feb 27, 2025
1 parent e9e0374 commit 61dc906
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stdlib/src/collections/string/string.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,10 @@ struct String(
Examples:
```mojo
print(String(List[Byte](ord('h'), ord('i'), 0))) # hi
%# from testing import assert_equal
var buf = List[Byte](ord('h'), ord('i'), 0)
var hi = String(buffer=buf^)
assert_equal(hi, "hi")
```
.
"""
Expand Down

0 comments on commit 61dc906

Please sign in to comment.