Ideas & Wishlist
Planned String Methods
The following string methods are planned but not yet implemented:
| Method | Description | Example |
|---|---|---|
s.capitalize() |
Capitalize first character only | "hello world".capitalize() → "Hello world" |
s.is_alpha() |
Check if all characters are letters | "hello".is_alpha() → true |
s.is_digit() |
Check if all characters are digits | "123".is_digit() → true |
s.remove(sub) |
Remove all occurrences of substring | "hello".remove("l") → "heo" |
s.pad_left(width, char) |
Pad string on the left | "42".pad_left(4, "0") → "0042" |
s.pad_right(width, char) |
Pad string on the right | "42".pad_right(4, " ") → "42 " |
s.to_bytes() |
Convert string to byte list | "Hi".to_bytes() → [72, 105] |
Last updated on