Strings¶
Moving bytes between Pony and C without guessing at their length.
Binaries may contain NUL bytes, so anything decoded from a message is
trimmed by the length the C layer reports and never by strlen.
Constructors¶
create¶
Returns¶
- Strings val^
Public Functions¶
buffer¶
A zeroed byte buffer of size bytes for the C layer to fill.
Parameters¶
- size: USize val
Returns¶
from_bytes¶
Takes the first len bytes of source as a String.
Parameters¶
Returns¶
- String val^
null_trimmed¶
Takes the bytes before the first NUL, for NUL terminated C strings.
Parameters¶
Returns¶
- String val^
eq¶
Parameters¶
- that: Strings val
Returns¶
- Bool val
ne¶
Parameters¶
- that: Strings val
Returns¶
- Bool val