Changeset 39 in code for trunk/lib/string_set.ml


Ignore:
Timestamp:
Dec 12, 2022, 10:52:55 PM (2 years ago)
Author:
fox
Message:

Read References field; referred by listing; test & tidy documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/string_set.ml

    r3 r39  
    22
    33let list_of_csv x = Str.(split (regexp " *, *")) (String.trim x)
    4 let of_string x = of_list (list_of_csv x)
     4let list_of_ssv x = Str.(split (regexp " +")) (String.trim x)
     5
     6let of_string ?(separator=list_of_csv) x = of_list (separator x)
     7let of_csv_string x = of_string ~separator:list_of_csv x
     8let of_ssv_string x = of_string ~separator:list_of_ssv x
     9
    510let to_string ?(pre="") ?(sep=", ") s =
    611  let j a x = match a, x with "", _ -> x | _, "" -> a | _ -> a ^ sep ^ x in
Note: See TracChangeset for help on using the changeset viewer.