diff options
Diffstat (limited to 'crates/stdx')
-rw-r--r-- | crates/stdx/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/stdx/src/lib.rs b/crates/stdx/src/lib.rs index f2ff0e435..100db9d5d 100644 --- a/crates/stdx/src/lib.rs +++ b/crates/stdx/src/lib.rs | |||
@@ -124,7 +124,7 @@ pub fn replace(buf: &mut String, from: char, to: &str) { | |||
124 | *buf = buf.replace(from, to) | 124 | *buf = buf.replace(from, to) |
125 | } | 125 | } |
126 | 126 | ||
127 | pub fn split1(haystack: &str, delim: char) -> Option<(&str, &str)> { | 127 | pub fn split_delim(haystack: &str, delim: char) -> Option<(&str, &str)> { |
128 | let idx = haystack.find(delim)?; | 128 | let idx = haystack.find(delim)?; |
129 | Some((&haystack[..idx], &haystack[idx + delim.len_utf8()..])) | 129 | Some((&haystack[..idx], &haystack[idx + delim.len_utf8()..])) |
130 | } | 130 | } |