Standard Library
std.string
String manipulation utilities for common text operations.
Exported functions
Find the first occurrence of a substring.
Return true when the string contains a substring.
Split a string by a delimiter.
Find the last occurrence of a substring.
Check if a string starts with a given prefix.
Check if a string ends with a given suffix.
Trim whitespace from the start of a string.
Trim whitespace from the end of a string.
Trim whitespace from both ends of a string.
Reverse a string.
Replace all occurrences of a substring with another string.
Replace the first occurrence of a substring with another string.
Convert a string to lowercase.
Convert a string to uppercase.
Join a list of strings with a separator.
Split text into lines, trimming a trailing "\r" from each line and dropping the final empty line produced by a trailing newline.
Split a string into two parts at the first occurrence of a delimiter.
Split a string into two parts at the last occurrence of a delimiter.
Count non-overlapping occurrences of a substring.
Remove a prefix when present.
Remove a suffix when present.
Repeat a string count times.
Pad a string on the left with a fill string until it reaches width.
Pad a string on the left with spaces until it reaches width.
Pad a string on the right with a fill string until it reaches width.
Pad a string on the right with spaces until it reaches width.