Nix string builtins
concatStringsSep separator list
- concat a list of strings with a separator between each elementfromJSON e
- Convert a JSON string to a Nix valuehashString type s
- Return a base-16 representation of the cryptographic hash ofs
under algorithmtype
, one ofmd5
orsha1/256/512
isString e
-true
ife
is a string, otherwisefalse
match regex str
- return a list of matches ifregex
matchesstr
, otherwisenull
replaceStrings from to s
- replaces each element offrom
ins
with the corresponding element into
split regex str
- returns a list of elements instr
not matchingregex
, interleaved with lists of elements matchingregex
stringLength e
- length of stringe
substring start len s
- return the substring of lengthlen
from 0-indexed positionstart
in strings
toFile name s
- writes
to a file in the Nix storeᛦ with suffixname
and return its path; CAVEAT: The result of a derivation cannot be antiquoted in such a string, thoughwriteTextFile
in nixpkgsᛦ cantoJSON e
- return a JSON string representinge
; standard types and data structures map to JSON naturally, but derivations and paths evaluate to store path stringstoXML e
- return an XML representation ofe