wu-sugar

API Reference

wu-sugar

A minimal utility library of string, file, and date functions.

WU-SUGAR

  • Function HASH (&rest rest)
    Make a hash table from key/value argument pairs.
  • Function & (&rest strings)
    (concatenate 'string ...) with less typing. Note: deprecated in favor of STR.
  • Function STR (&rest values)
  • Function JOIN (separator &rest strings)
    Concatenates STRINGS, joining them by SEPARATOR.
  • Function SPLIT (string &rest delimiter-chars)
    Splits STRING by one or more delimiter characters, returning a list.
  • Function STARTS-WITH-P (seq subseq)
  • Function ENDS-WITH-P (seq subseq)
  • Function FILE-TO-STRING (filespec)
  • Function STRING-TO-FILE (string filespec)
  • Function FORMAT-UNIVERSAL-TIME-ISO (stream universal-time colon atsign)
    Format a universal time as an ISO 8601 / RFC 3339 date. Use with format, e.g. (format t "~/wu-sugar:format-universal-time-iso/" (get-universal-time)). If at-sign is supplied, time will be given in local time rather than UTC.
  • Function UNIVERSAL-TIME-TO-ISO (universal-time &optional local-time-zone-p)
    Returns an ISO 8601 / RFC 3339 formatted date/time string either in UTC (the default), or the local time zone.