pub fn safesplit(s: &str, sep: char) -> SafesplitIter<'_> {
    //assert_eq!(sep.len_utf8(), 1);
    SafesplitIter {
        s,
        sep,
        i: 0,
        exhausted: s.is_empty(),
    }
}
/// An iterator over substrings of a string, separated by a separation
/// character, but only if not enclosed in curly braces.
///
/// # Examples
///
/// Split a string at comma's:
///
/// ```
/// let v: Vec<&str> = stringly::util::safesplit("a,b,{c,d}", ',').collect();
/// assert_eq!(v, ["a", "b", "{c,d}"]);
/// ```
///
/// Splitting an empty string yields zero items:
///
/// ```
/// assert_eq!(stringly::util::safesplit("", ',').next(), None);
/// ```
An iterator over substrings of a string, separated by a separation
character, but only if not enclosed in curly braces.
An iterator over substrings of a string separated by a separation character but only if not enclosed in curly braces .
pub fn safesplit(s: &str, sep: char) -> SafesplitIter<'_> {
    //assert_eq!(sep.len_utf8(), 1);
    SafesplitIter {
        s,
        sep,
        i: 0,
        exhausted: s.is_empty(),
    }
}
pub fn safesplit ( s : & str , sep : char ) -> SafesplitIter < ' _ > { //assert_eq!(sep.len_utf8(), 1); SafesplitIter { s , sep , i : 0 , exhausted : s . is_empty ( ) , } }
An iterator over substrings of a string, separated by a separation
character, but only if not enclosed in curly braces.
An iterator over substrings of a string separated by a separation character but only if not enclosed in curly braces .
s
&str
sep
char
s
&str
sep
char
examples
Split a string at comma's.



Splitting an empty string yields zero items.


Split a string at comma ' s . Splitting an empty string yields zero items .