JanetDocsSign in with Github

string/split



    cfunction

    (string/split delim str &opt start limit)
    
    Splits a string str with delimiter delim and returns an array of
    substrings. The substrings will not contain the delimiter delim. If
    delim is not found, the returned array will have one element. Will
    start searching for delim at the index start (if provided), and return
    up to a maximum of limit results (if provided).


2 examplesSign in to add an example
Loading...
(defn slurp-lines [path]
  (string/split "\n" (slurp path)))
cellularmitosis
(string/split "," "bruce,scott,tiger,woods") # => @["bruce" "scott" "tiger" "woods"]
sogaiu