method str.trimPrefix
self without the leading prefix (unchanged if it does not start with it).
Example:
fn main() io {
print("v1.0".trimPrefix("v"))
}Output
1.0
pub(api) fn trimPrefix(prefix: str) -> strSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
prefix | str |
Returns
str
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/text.oxl:642