method str.splitOnce
Splits at the first sep: "k=v=w".splitOnce("=") is ("k", "v=w"); none if sep does not occur.
Example:
fn main() io {
print("{"key=a=b".splitOnce("=")}")
}Output
("key", "a=b")pub(api) fn splitOnce(sep: str) -> (str, str)?Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
sep | str |
Returns
(str, str)?
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/text.oxl:666