Use `split` proc
    
    
    proc split(s: string; seps: set[char] = Whitespace; maxsplit: int = - 1): 
seq[string] {..}
    

to use
    
    
    from strutils import split
    
    for token in "My string when splitted".split(maxsplit = 1):
      echo token
    

Reply via email to