StringView_Partition for One-Off Splits

This commit is contained in:
VegOwOtenks 2024-09-23 18:37:54 +02:00
parent 1a330b3c9b
commit 1b3d007ec2
3 changed files with 51 additions and 0 deletions

View file

@ -46,7 +46,9 @@ size_t StringView_FindStringOffset(StringView haystack, StringView needle);
StringView StringView_FindString(StringView haystack, StringView needle);
StringView StringView_Slice(StringView string, size_t start, size_t end); // start and end are offsets
bool StringView_Partition(StringView* left, StringView* right, StringView source, StringView delim);
bool StringView_NextSplit(StringView* dest, StringView* source, StringView delim);
bool StringView_LastSplit(StringView* dest, StringView* source, StringView delim);
StringView StringView_StripLeft(StringView sv, StringView strip);
StringView StringView_StripRight(StringView sv, StringView strip);