summaryrefslogtreecommitdiff
path: root/lib/default.nix
diff options
context:
space:
mode:
authorMatt Sturgeon <matt@sturgeon.me.uk>2024-05-28 18:22:43 +0100
committerMatt Sturgeon <matt@sturgeon.me.uk>2024-07-25 23:43:33 +0100
commitaad87c2aa8d00fe8a9c4d8198cf166d652f8f28c (patch)
tree393fab90dfcd7380d2d231fdbeed75d55e6547f5 /lib/default.nix
parentMerge pull request #329788 from r-ryantm/auto-update/ants (diff)
downloadnixpkgs-aad87c2aa8d00fe8a9c4d8198cf166d652f8f28c.tar.gz
lib.strings: add `trim` and `trimWith`
`strings.trim` returns a copy of the string with all leading and trailing whitespace removed. `strings.trimWith` does the same thing, but calling code can decide whether to trim the start and/or end of the string.
Diffstat (limited to 'lib/default.nix')
-rw-r--r--lib/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/default.nix b/lib/default.nix
index d637ca203f0e..63a31101eee7 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -105,7 +105,7 @@ let
hasInfix hasPrefix hasSuffix stringToCharacters stringAsChars escape
escapeShellArg escapeShellArgs
isStorePath isStringLike
- isValidPosixName toShellVar toShellVars
+ isValidPosixName toShellVar toShellVars trim trimWith
escapeRegex escapeURL escapeXML replaceChars lowerChars
upperChars toLower toUpper addContextFrom splitString
removePrefix removeSuffix versionOlder versionAtLeast