Sprig functions Argo supports
Argo Workflows bundles Sprig, but only
part of it: two functions, env and expandenv, are removed before an
expression ever sees them. Argo also adds a handful of its own functions, and
expr-lang, the expression language itself, ships a further set of builtins.
Argo’s own docs don’t say which Sprig functions are missing or what any of
them do, so this page lists all three sets together.
Every function below works the same way: inside {{=...}}, in any field that
takes a {{...}} tag. None of them work in depends, which reads step results
directly, and none of them work in a plain {{...}} tag, which only
substitutes a value. See Expressions for how the two kinds of
tag differ.
284 functions
absexpr-lang builtinabs(number) numberGives the absolute value of a number.
abs(-5) == 5allexpr-lang builtinall(list, predicate) boolReports whether every element of a list satisfies a condition.
all([2, 4, 6], {# % 2 == 0}) == trueanyexpr-lang builtinany(list, predicate) boolReports whether any element of a list satisfies a condition.
any([1, 3, 5], {# % 2 == 0}) == falseasFloatArgo functionasFloat(text) numberTurns text into a number with decimals
asFloat('4.2') == 4.2asIntArgo functionasInt(text) numberTurns text into a whole number
asInt('42') == 42bitandexpr-lang builtinbitand(a number, b number) numberBitwise AND of two whole numbers.
bitand(0b1010, 0b1100) == 0b1000bitnandexpr-lang builtinbitnand(a number, b number) numberBitwise AND NOT of two whole numbers: bits set in a and not in b.
bitnand(0b1010, 0b1100) == 0b10bitnotexpr-lang builtinbitnot(number) numberBitwise NOT of a whole number.
bitnot(0b1010) == -0b1011bitorexpr-lang builtinbitor(a number, b number) numberBitwise OR of two whole numbers.
bitor(0b1010, 0b1100) == 0b1110bitshlexpr-lang builtinbitshl(number, places number) numberShifts a whole number's bits left.
bitshl(0b101101, 2) == 0b10110100bitshrexpr-lang builtinbitshr(number, places number) numberShifts a whole number's bits right, keeping the sign.
bitshr(0b101101, 2) == 0b1011bitushrexpr-lang builtinbitushr(number, places number) numberShifts a whole number's bits right, filling with zeros regardless of sign.
bitushr(4, 1) == 2bitxorexpr-lang builtinbitxor(a number, b number) numberBitwise XOR of two whole numbers.
bitxor(0b1010, 0b1100) == 0b110ceilexpr-lang builtinceil(number) numberRounds a number up to the nearest whole number.
ceil(1.5) == 2.0concatexpr-lang builtinconcat(list, ...lists) listJoins two or more lists end to end.
concat([1, 2], [3, 4]) == [1, 2, 3, 4]countexpr-lang builtincount(list, predicate) numberCounts the elements of a list that satisfy a condition. With no condition, counts the true elements.
count([1, 2, 3, 4], {# > 2}) == 2dateexpr-lang builtindate(text, layout text, zone text) timeParses text into a date. An optional layout and time zone say how to read it.
date('2023-08-14').Year() == 2023durationexpr-lang builtinduration(text) durationParses text like 1h or 30m into a duration.
duration('1h').Seconds() == 3600filterexpr-lang builtinfilter(list, predicate) listGives a new list of the elements that satisfy a condition.
filter([1, 2, 3, 4], {# % 2 == 0}) == [2, 4]findexpr-lang builtinfind(list, predicate) anyFinds the first element of a list that satisfies a condition.
find([1, 2, 3, 4], {# > 2}) == 3findIndexexpr-lang builtinfindIndex(list, predicate) numberFinds the index of the first element of a list that satisfies a condition.
findIndex([1, 2, 3, 4], {# > 2}) == 2findLastexpr-lang builtinfindLast(list, predicate) anyFinds the last element of a list that satisfies a condition.
findLast([1, 2, 3, 4], {# > 2}) == 4findLastIndexexpr-lang builtinfindLastIndex(list, predicate) numberFinds the index of the last element of a list that satisfies a condition.
findLastIndex([1, 2, 3, 4], {# > 2}) == 3firstexpr-lang builtinfirst(list) anyGives the first element of a list.
first([1, 2, 3]) == 1flattenexpr-lang builtinflatten(list) listFlattens a nested list into one dimension.
flatten([1, 2, [3, 4]]) == [1, 2, 3, 4]floatexpr-lang builtinfloat(value) numberTurns a number or text into a number with decimals.
float('123.45') == 123.45floorexpr-lang builtinfloor(number) numberRounds a number down to the nearest whole number.
floor(1.5) == 1.0fromBase64expr-lang builtinfromBase64(text) textDecodes base64 text.
fromBase64('SGVsbG8gV29ybGQ=') == 'Hello World'fromJSONexpr-lang builtinfromJSON(text) anyReads JSON text into a value.
fromJSON('{"name": "John", "age": 30}')['name'] == 'John'fromPairsexpr-lang builtinfromPairs(list) dictTurns a list of [key, value] pairs into a dict.
fromPairs([['name', 'John']])['name'] == 'John'getexpr-lang builtinget(value, index) anyReads an element or key from a list or dict, or nil if it isn't there.
get([1, 2, 3], 1) == 2groupByexpr-lang builtingroupBy(list, predicate) dictGroups the elements of a list by the result of an expression.
groupBy([1, 2, 3, 4], {# % 2})[0] == [2, 4]hasPrefixexpr-lang builtinhasPrefix(text, prefix text) boolReports whether text starts with a prefix.
hasPrefix('HelloWorld', 'Hello') == truehasSuffixexpr-lang builtinhasSuffix(text, suffix text) boolReports whether text ends with a suffix.
hasSuffix('HelloWorld', 'World') == trueindexOfexpr-lang builtinindexOf(text, substr text) numberGives the position of the first occurrence of a substring, or -1 if it isn't found.
indexOf('apple pie', 'pie') == 6intexpr-lang builtinint(value) numberTurns a number or text into a whole number.
int('123') == 123joinexpr-lang builtinjoin(list, sep text) textJoins a list of text into one piece of text, with an optional separator.
join(['apple', 'orange', 'grape'], ',') == 'apple,orange,grape'jsonpathArgo functionjsonpath(text, path) anyReads a value out of JSON text
jsonpath('{"region":"eu"}', '$.region') == 'eu'keysexpr-lang builtinkeys(dict) listLists the keys of a dict.
len(keys({'name': 'John', 'age': 30})) == 2lastexpr-lang builtinlast(list) anyGives the last element of a list.
last([1, 2, 3]) == 3lastIndexOfexpr-lang builtinlastIndexOf(text, substr text) numberGives the position of the last occurrence of a substring, or -1 if it isn't found.
lastIndexOf('apple pie apple', 'apple') == 10lenexpr-lang builtinlen(value) numberGives the length of a list, dict or piece of text.
len('Hello') == 5lowerexpr-lang builtinlower(text) textTurns text to lower case.
lower('HELLO') == 'hello'mapexpr-lang builtinmap(list, predicate) listGives a new list by applying an expression to every element.
map([1, 2, 3], {# * 2}) == [2, 4, 6]maxexpr-lang builtinmax(number, ...numbers) numberGives the largest of the numbers given.
max(5, 7) == 7meanexpr-lang builtinmean(list) numberGives the average of the numbers in a list.
mean([1, 2, 3]) == 2.0medianexpr-lang builtinmedian(list) numberGives the median of the numbers in a list.
median([1, 2, 3]) == 2.0minexpr-lang builtinmin(number, ...numbers) numberGives the smallest of the numbers given.
min(5, 7) == 5noneexpr-lang builtinnone(list, predicate) boolReports whether no element of a list satisfies a condition.
none([1, 3, 5], {# % 2 == 0}) == truenowexpr-lang builtinnow() timeGives the current date and time.
now().Year() > 2000oneexpr-lang builtinone(list, predicate) boolReports whether exactly one element of a list satisfies a condition.
one([1, 2, 3], {# % 2 == 0}) == truereduceexpr-lang builtinreduce(list, predicate, initial) anyReduces a list to one value, carrying an accumulator (#acc) through each element. The accumulator starts as the first element unless you give an initial value.
reduce([1, 2, 3], {#acc + #}, 0) == 6repeatexpr-lang builtinrepeat(text, n number) textRepeats text a number of times.
repeat('ab', 3) == 'ababab'replaceexpr-lang builtinreplace(text, old text, new text) textReplaces every occurrence of one piece of text with another.
replace('Hello World', 'World', 'Universe') == 'Hello Universe'reverseexpr-lang builtinreverse(list) listReverses the order of a list.
reverse([3, 1, 4]) == [4, 1, 3]roundexpr-lang builtinround(number) numberRounds a number to the nearest whole number.
round(1.5) == 2.0sortexpr-lang builtinsort(list, order text) listSorts a list. An optional order is asc or desc.
sort([3, 1, 4]) == [1, 3, 4]sortByexpr-lang builtinsortBy(list, predicate, order text) listSorts a list by the result of an expression. An optional order is asc or desc.
sortBy([3, 1, 4], {#}) == [1, 3, 4]splitexpr-lang builtinsplit(text, sep text, limit number) listSplits text at every occurrence of a separator, up to an optional limit.
split('apple,orange,grape', ',') == ['apple', 'orange', 'grape']splitAfterexpr-lang builtinsplitAfter(text, sep text, limit number) listSplits text after every occurrence of a separator, keeping the separator on each piece.
splitAfter('apple,orange,grape', ',') == ['apple,', 'orange,', 'grape']sprig.abbrevSprig functionsprig.abbrev(width number, text) textShortens text to a width, ending in ... if it was cut.
sprig.abbrev(7, 'abcdefghij') == 'abcd...'sprig.abbrevbothSprig functionsprig.abbrevboth(left number, right number, text) textShortens text from both ends, keeping a middle window.
len(sprig.abbrevboth(5, 10, 'abcdefghijklmnopqrstuvwxyz')) <= 10sprig.addSprig functionsprig.add(...numbers) numberAdds numbers together.
sprig.add(1, 2, 3) == 6sprig.add1Sprig functionsprig.add1(number) numberAdds one to a number.
sprig.add1(1) == 2sprig.add1fSprig functionsprig.add1f(number) numberAdds one to a number with decimals.
sprig.add1f(1.5) == 2.5sprig.addfSprig functionsprig.addf(...numbers) numberAdds numbers with decimals together.
sprig.addf(1.5, 2.5) == 4sprig.adler32sumSprig functionsprig.adler32sum(text) textChecksums text with Adler-32, as a decimal number.
int(sprig.adler32sum('abc')) > 0sprig.agoSprig functionsprig.ago(date) textGives how long ago a date was, as text like 3h0m0s.
len(sprig.ago(sprig.now())) > 0sprig.allSprig functionsprig.all(value, ...) boolReports whether every value given is non-empty.
sprig.all('a', 'b') == truesprig.anySprig functionsprig.any(value, ...) boolReports whether any value given is non-empty.
sprig.any('', 'b') == truesprig.appendSprig functionsprig.append(list, value) listAdds a value onto the end of a list, giving a new list. Same as push.
sprig.append([1, 2], 3) == [1, 2, 3]sprig.atoiSprig functionsprig.atoi(text) numberTurns text into a whole number. Gives 0 if it isn't one.
sprig.atoi('42') == 42sprig.b32decSprig functionsprig.b32dec(text) textDecodes base32 text.
sprig.b32dec(sprig.b32enc('hi')) == 'hi'sprig.b32encSprig functionsprig.b32enc(text) textEncodes text as base32.
sprig.b32dec(sprig.b32enc('hi')) == 'hi'sprig.b64decSprig functionsprig.b64dec(text) textDecodes base64 text.
sprig.b64dec('aGk=') == 'hi'sprig.b64encSprig functionsprig.b64enc(text) textEncodes text as base64.
sprig.b64enc('hi') == 'aGk='sprig.baseSprig functionsprig.base(path text) textGives the last element of a slash-separated path.
sprig.base('/foo/bar/baz.txt') == 'baz.txt'sprig.bcryptSprig functionsprig.bcrypt(text) textHashes text with bcrypt.
sprig.bcrypt('pw') != ''sprig.biggestSprig functionsprig.biggest(a number, ...numbers) numberGives the largest of the whole numbers passed in. Same as max.
sprig.biggest(3, 7) == 7sprig.buildCustomCertSprig functionsprig.buildCustomCert(b64cert text, b64key text) certBuilds a certificate object from a base64-encoded certificate and key.
let ca = sprig.genCA('ci', 1); sprig.buildCustomCert(sprig.b64enc(ca.Cert), sprig.b64enc(ca.Key)).Cert != ''sprig.camelcaseSprig functionsprig.camelcase(text) textTurns snake_case or kebab-case text into PascalCase.
sprig.camelcase('some_var') == 'SomeVar'sprig.catSprig functionsprig.cat(value, ...) textJoins values with a space, skipping any that are empty.
sprig.cat('a', 'b', 'c') == 'a b c'sprig.ceilSprig functionsprig.ceil(number) numberRounds a number up to the nearest whole number.
sprig.ceil(1.5) == 2sprig.chunkSprig functionsprig.chunk(size number, list) listSplits a list into chunks of a size.
len(sprig.chunk(2, [1, 2, 3, 4, 5])) == 3 && sprig.chunk(2, [1, 2, 3, 4, 5])[0] == [1, 2]sprig.cleanSprig functionsprig.clean(path text) textSimplifies a slash-separated path, resolving . and .. and doubled slashes.
sprig.clean('/foo/../bar//baz') == '/bar/baz'sprig.coalesceSprig functionsprig.coalesce(value, ...) anyGives the first value that isn't empty.
sprig.coalesce('', 0, 'x') == 'x'sprig.compactSprig functionsprig.compact(list) listDrops the empty values out of a list.
sprig.compact(['a', '', 'b']) == ['a', 'b']sprig.concatSprig functionsprig.concat(list, ...lists) listJoins lists end to end into one list.
sprig.concat([1, 2], [3, 4]) == [1, 2, 3, 4]sprig.containsSprig functionsprig.contains(substr text, text) boolReports whether text holds a substring.
sprig.contains('ell', 'Hello') == truesprig.dateSprig functionsprig.date(layout text, date) textFormats a date using this server's local time zone.
len(sprig.date('2006-01-02', 1700000000)) == 10sprig.date_in_zoneSprig functionsprig.date_in_zone(layout text, date, zone text) textFormats a date in a named time zone. Same as dateInZone.
sprig.date_in_zone('2006-01-02', 1700000000, 'UTC') == '2023-11-14'sprig.date_modifySprig functionsprig.date_modify(duration text, date) dateAdds a duration to a date. Same as dateModify.
sprig.date_modify('1h', sprig.toDate('2006-01-02', '2024-01-01')).Hour() == 1sprig.dateInZoneSprig functionsprig.dateInZone(layout text, date, zone text) textFormats a date in a named time zone.
sprig.dateInZone('2006-01-02', 1700000000, 'UTC') == '2023-11-14'sprig.dateModifySprig functionsprig.dateModify(duration text, date) dateAdds a duration to a date.
sprig.dateModify('1h', sprig.toDate('2006-01-02', '2024-01-01')).Hour() == 1sprig.decryptAESSprig functionsprig.decryptAES(password text, text) textDecrypts text that was encrypted with encryptAES and the same password.
sprig.decryptAES('s3cr3t!', sprig.encryptAES('s3cr3t!', 'hello')) == 'hello'sprig.deepCopySprig functionsprig.deepCopy(value) anyMakes an independent copy of a value.
sprig.deepCopy([1, 2, 3]) == [1, 2, 3]sprig.deepEqualSprig functionsprig.deepEqual(a, b) boolReports whether two values are deeply equal, comparing lists and dicts field by field.
sprig.deepEqual([1, 2], [1, 2]) == truesprig.defaultSprig functionsprig.default(fallback, value) anyGives a fallback when a value is empty.
sprig.default('fallback', '') == 'fallback'sprig.derivePasswordSprig functionsprig.derivePassword(counter number, kind text, password text, user text, site text) textDerives a Master Password style password for a site, the same way every time for the same inputs. Its counter argument needs a Go uint32, and no Sprig or expr function can produce one, so Argo can't actually call this from an expression.
len(sprig.derivePassword(1, 'long', 'password', 'user', 'example.com')) == 14sprig.dictSprig functionsprig.dict(key text, value, ...) dictBuilds a dict out of alternating keys and values.
len(sprig.dict('a', 1, 'b', 2)) == 2 && sprig.dict('a', 1, 'b', 2)['a'] == 1sprig.digSprig functionsprig.dig(key, ..., default, dict) anyReads a nested value out of a dict by a path of keys, or gives a default if any key is missing.
sprig.dig('a', 'b', 'nope', sprig.dict('a', sprig.dict('b', 'found'))) == 'found'sprig.dirSprig functionsprig.dir(path text) textGives every element of a slash-separated path except the last.
sprig.dir('/foo/bar/baz.txt') == '/foo/bar'sprig.divSprig functionsprig.div(a number, b number) numberDivides one number by another, as whole numbers.
sprig.div(6, 2) == 3sprig.divfSprig functionsprig.divf(a number, ...numbers) numberDivides a number with decimals by the numbers after it.
sprig.divf(9, 3) == 3sprig.durationSprig functionsprig.duration(seconds text) textTurns a number of seconds into text like 5m0s.
sprig.duration('300') == '5m0s'sprig.durationRoundSprig functionsprig.durationRound(duration text) textRounds a duration down to its largest whole unit, like 9d.
sprig.durationRound('220h') == '9d'sprig.emptySprig functionsprig.empty(value) boolReports whether a value is the zero value for its type: '', 0, false, or an empty list or dict.
sprig.empty('') == truesprig.encryptAESSprig functionsprig.encryptAES(password text, text) textEncrypts text with AES, using a password as the key.
sprig.decryptAES('s3cr3t!', sprig.encryptAES('s3cr3t!', 'hello')) == 'hello'sprig.extSprig functionsprig.ext(path text) textGives the file extension of a slash-separated path, including the dot.
sprig.ext('/foo/bar.txt') == '.txt'sprig.failSprig functionsprig.fail(message text) never returnsStops the expression with an error carrying your message. Always fails, on purpose.
sprig.fail('boom')sprig.firstSprig functionsprig.first(list) anyGives the first item of a list.
sprig.first([1, 2, 3]) == 1sprig.float64Sprig functionsprig.float64(value) numberTurns a value into a number with decimals.
sprig.float64('4.2') == 4.2sprig.floorSprig functionsprig.floor(number) numberRounds a number down to the nearest whole number.
sprig.floor(1.5) == 1sprig.fromJsonSprig functionsprig.fromJson(text) anyReads JSON text into a value.
sprig.fromJson('"hi"') == 'hi'sprig.genCASprig functionsprig.genCA(commonName text, daysValid number) certGenerates a self-signed certificate authority.
sprig.genCA('ci', 1).Cert != ''sprig.genCAWithKeySprig functionsprig.genCAWithKey(commonName text, daysValid number, privateKey text) certGenerates a self-signed certificate authority using a private key you already have.
sprig.genCAWithKey('ci', 1, sprig.genPrivateKey('ecdsa')).Cert != ''sprig.genPrivateKeySprig functionsprig.genPrivateKey(kind text) textGenerates a new PEM-encoded private key, of a kind such as rsa, dsa, ecdsa or ed25519.
sprig.genPrivateKey('ecdsa') != ''sprig.genSelfSignedCertSprig functionsprig.genSelfSignedCert(commonName text, ips list, dnsNames list, daysValid number) certGenerates a self-signed certificate.
sprig.genSelfSignedCert('example.com', [], [], 1).Cert != ''sprig.genSelfSignedCertWithKeySprig functionsprig.genSelfSignedCertWithKey(commonName text, ips list, dnsNames list, daysValid number, privateKey text) certGenerates a self-signed certificate using a private key you already have.
sprig.genSelfSignedCertWithKey('example.com', [], [], 1, sprig.genPrivateKey('ecdsa')).Cert != ''sprig.genSignedCertSprig functionsprig.genSignedCert(commonName text, ips list, dnsNames list, daysValid number, ca cert) certGenerates a certificate signed by a certificate authority.
sprig.genSignedCert('example.com', [], [], 1, sprig.genCA('ci', 1)).Cert != ''sprig.genSignedCertWithKeySprig functionsprig.genSignedCertWithKey(commonName text, ips list, dnsNames list, daysValid number, ca cert, privateKey text) certGenerates a certificate signed by a certificate authority, using a private key you already have.
sprig.genSignedCertWithKey('example.com', [], [], 1, sprig.genCA('ci', 1), sprig.genPrivateKey('ecdsa')).Cert != ''sprig.getSprig functionsprig.get(dict, key text) anyReads a key from a dict, or gives an empty value if it's missing.
sprig.get(sprig.dict('a', 1), 'a') == 1sprig.getHostByNameSprig functionsprig.getHostByName(host text) textLooks up one IP address for a hostname.
sprig.getHostByName('example.com') != ''sprig.hasSprig functionsprig.has(value, list) boolReports whether a list holds a value.
sprig.has(2, [1, 2, 3]) == truesprig.hasKeySprig functionsprig.hasKey(dict, key text) boolReports whether a dict has a key.
sprig.hasKey(sprig.dict('a', 1), 'a') == truesprig.hasPrefixSprig functionsprig.hasPrefix(prefix text, text) boolReports whether text starts with a prefix.
sprig.hasPrefix('Hello', 'HelloWorld') == truesprig.hasSuffixSprig functionsprig.hasSuffix(suffix text, text) boolReports whether text ends with a suffix.
sprig.hasSuffix('World', 'HelloWorld') == truesprig.helloSprig functionsprig.hello() textReturns a fixed greeting. Mostly used to check Sprig is wired up.
sprig.hello() == 'Hello!'sprig.htmlDateSprig functionsprig.htmlDate(date) textFormats a date as YYYY-MM-DD, using this server's local time zone.
len(sprig.htmlDate(1700000000)) == 10sprig.htmlDateInZoneSprig functionsprig.htmlDateInZone(date, zone text) textFormats a date as YYYY-MM-DD in a named time zone.
sprig.htmlDateInZone(1700000000, 'UTC') == '2023-11-14'sprig.htpasswdSprig functionsprig.htpasswd(username text, password text) textBuilds a username:bcrypt-hash line for a .htpasswd file.
len(sprig.htpasswd('ann', 'pw')) > 4sprig.indentSprig functionsprig.indent(spaces number, text) textAdds spaces to the front of every line of text.
sprig.indent(2, 'a') == ' a'sprig.initialSprig functionsprig.initial(list) listGives every item of a list except the last.
sprig.initial([1, 2, 3]) == [1, 2]sprig.initialsSprig functionsprig.initials(text) textTakes the first letter of each word.
sprig.initials('John Doe') == 'JD'sprig.intSprig functionsprig.int(value) numberTurns a value into a whole number.
sprig.int('42') == 42sprig.int64Sprig functionsprig.int64(value) numberTurns a value into a 64-bit whole number.
sprig.int64('42') == 42sprig.isAbsSprig functionsprig.isAbs(path text) boolReports whether a slash-separated path is absolute.
sprig.isAbs('/foo/bar') == truesprig.joinSprig functionsprig.join(sep text, list) textJoins a list into text with a separator between each value.
sprig.join(',', [1, 2, 3]) == '1,2,3'sprig.kebabcaseSprig functionsprig.kebabcase(text) textTurns CamelCase text into kebab-case.
sprig.kebabcase('CamelCase') == 'camel-case'sprig.keysSprig functionsprig.keys(dict, ...) listLists the keys of one or more dicts.
len(sprig.keys(sprig.dict('a', 1, 'b', 2))) == 2 && 'a' in sprig.keys(sprig.dict('a', 1, 'b', 2))sprig.kindIsSprig functionsprig.kindIs(kind text, value) boolReports whether a value has a named kind.
sprig.kindIs('string', 'hi') == truesprig.kindOfSprig functionsprig.kindOf(value) textNames the underlying kind of a value, such as string, slice or map.
sprig.kindOf('hi') == 'string'sprig.lastSprig functionsprig.last(list) anyGives the last item of a list.
sprig.last([1, 2, 3]) == 3sprig.listSprig functionsprig.list(value, ...) listBuilds a list out of the values given.
sprig.list(1, 2, 3) == [1, 2, 3]sprig.lowerSprig functionsprig.lower(text) textTurns text to lower case.
sprig.lower('ABC') == 'abc'sprig.maxSprig functionsprig.max(a number, ...numbers) numberGives the largest of the whole numbers passed in.
sprig.max(3, 7) == 7sprig.maxfSprig functionsprig.maxf(a number, ...numbers) numberGives the largest of the numbers with decimals passed in.
sprig.maxf(3.5, 7.1) == 7.1sprig.mergeSprig functionsprig.merge(dict, ...dicts) dictCopies keys from other dicts into the first one that aren't already set there.
sprig.merge(sprig.dict('a', 1), sprig.dict('b', 2))['a'] == 1 && sprig.merge(sprig.dict('a', 1), sprig.dict('b', 2))['b'] == 2sprig.mergeOverwriteSprig functionsprig.mergeOverwrite(dict, ...dicts) dictCopies keys from other dicts into the first one, overwriting any that were already set.
sprig.mergeOverwrite(sprig.dict('a', 1), sprig.dict('a', 2))['a'] == 2sprig.minSprig functionsprig.min(a number, ...numbers) numberGives the smallest of the whole numbers passed in.
sprig.min(3, 7) == 3sprig.minfSprig functionsprig.minf(a number, ...numbers) numberGives the smallest of the numbers with decimals passed in.
sprig.minf(3.5, 7.1) == 3.5sprig.modSprig functionsprig.mod(a number, b number) numberGives the remainder of dividing one number by another.
sprig.mod(7, 3) == 1sprig.mulSprig functionsprig.mul(a number, ...numbers) numberMultiplies numbers together.
sprig.mul(2, 3, 4) == 24sprig.mulfSprig functionsprig.mulf(a number, ...numbers) numberMultiplies numbers with decimals together.
sprig.mulf(2.5, 4) == 10sprig.must_date_modifySprig functionsprig.must_date_modify(duration text, date) dateAdds a duration to a date, or fails if the duration doesn't parse. Same as mustDateModify.
sprig.must_date_modify('2h', sprig.toDate('2006-01-02', '2024-01-01')).Hour() == 2sprig.mustAppendSprig functionsprig.mustAppend(list, value) listAdds a value onto the end of a list, or fails if it isn't a list. Same as mustPush.
sprig.mustAppend([1, 2], 3) == [1, 2, 3]sprig.mustChunkSprig functionsprig.mustChunk(size number, list) listSplits a list into chunks of a size, or fails if it isn't a list.
len(sprig.mustChunk(2, [1, 2, 3, 4, 5])) == 3 && sprig.mustChunk(2, [1, 2, 3, 4, 5])[0] == [1, 2]sprig.mustCompactSprig functionsprig.mustCompact(list) listDrops the empty values out of a list, or fails if it isn't a list.
sprig.mustCompact(['a', '', 'b']) == ['a', 'b']sprig.mustDateModifySprig functionsprig.mustDateModify(duration text, date) dateAdds a duration to a date, or fails if the duration doesn't parse.
sprig.mustDateModify('2h', sprig.toDate('2006-01-02', '2024-01-01')).Hour() == 2sprig.mustDeepCopySprig functionsprig.mustDeepCopy(value) anyMakes an independent copy of a value, or fails on a bad argument.
sprig.mustDeepCopy([1, 2, 3]) == [1, 2, 3]sprig.mustFirstSprig functionsprig.mustFirst(list) anyGives the first item of a list, or fails if it isn't a list.
sprig.mustFirst([1, 2, 3]) == 1sprig.mustFromJsonSprig functionsprig.mustFromJson(text) anyReads JSON text into a value, or fails if it isn't valid JSON.
sprig.mustFromJson('"hi"') == 'hi'sprig.mustHasSprig functionsprig.mustHas(value, list) boolReports whether a list holds a value, or fails if it isn't a list.
sprig.mustHas(2, [1, 2, 3]) == truesprig.mustInitialSprig functionsprig.mustInitial(list) listGives every item of a list except the last, or fails if it isn't a list.
sprig.mustInitial([1, 2, 3]) == [1, 2]sprig.mustLastSprig functionsprig.mustLast(list) anyGives the last item of a list, or fails if it isn't a list.
sprig.mustLast([1, 2, 3]) == 3sprig.mustMergeSprig functionsprig.mustMerge(dict, ...dicts) dictCopies keys from other dicts into the first one, or fails on a bad argument.
sprig.mustMerge(sprig.dict('a', 1), sprig.dict('b', 2))['b'] == 2sprig.mustMergeOverwriteSprig functionsprig.mustMergeOverwrite(dict, ...dicts) dictCopies keys from other dicts into the first one, overwriting existing keys, or fails on a bad argument.
sprig.mustMergeOverwrite(sprig.dict('a', 1), sprig.dict('a', 2))['a'] == 2sprig.mustPrependSprig functionsprig.mustPrepend(list, value) listAdds a value onto the front of a list, or fails if it isn't a list.
sprig.mustPrepend([2, 3], 1) == [1, 2, 3]sprig.mustPushSprig functionsprig.mustPush(list, value) listAdds a value onto the end of a list, or fails if it isn't a list.
sprig.mustPush([1, 2], 3) == [1, 2, 3]sprig.mustRegexFindSprig functionsprig.mustRegexFind(pattern text, text) textFinds the first match of a regular expression, or fails if the pattern is invalid.
sprig.mustRegexFind('[0-9]+', 'a123b') == '123'sprig.mustRegexFindAllSprig functionsprig.mustRegexFindAll(pattern text, text, limit number) listFinds every match of a regular expression, or fails if the pattern is invalid.
sprig.mustRegexFindAll('[0-9]+', 'a1 b22 c333', -1) == ['1', '22', '333']sprig.mustRegexMatchSprig functionsprig.mustRegexMatch(pattern text, text) boolReports whether text matches a regular expression, or fails if the pattern is invalid.
sprig.mustRegexMatch('^[a-z]+$', 'abc') == truesprig.mustRegexReplaceAllSprig functionsprig.mustRegexReplaceAll(pattern text, text, replacement text) textReplaces every match of a regular expression, or fails if the pattern is invalid.
sprig.mustRegexReplaceAll('[0-9]+', 'a123b456', 'X') == 'aXbX'sprig.mustRegexReplaceAllLiteralSprig functionsprig.mustRegexReplaceAllLiteral(pattern text, text, replacement text) textReplaces every match with a literal replacement, or fails if the pattern is invalid.
sprig.mustRegexReplaceAllLiteral('([a-z]+)', 'abc', '$1$1') == '$1$1'sprig.mustRegexSplitSprig functionsprig.mustRegexSplit(pattern text, text, limit number) listSplits text at each match of a regular expression, or fails if the pattern is invalid.
sprig.mustRegexSplit(' +', 'a b c', -1) == ['a', 'b', 'c']sprig.mustRestSprig functionsprig.mustRest(list) listGives every item of a list except the first, or fails if it isn't a list.
sprig.mustRest([1, 2, 3]) == [2, 3]sprig.mustReverseSprig functionsprig.mustReverse(list) listReverses the order of a list, or fails if it isn't a list.
sprig.mustReverse([1, 2, 3]) == [3, 2, 1]sprig.mustSliceSprig functionsprig.mustSlice(list, start number, end number) listTakes a slice of a list between two positions, or fails if it isn't a list.
sprig.mustSlice([1, 2, 3, 4, 5], 1, 3) == [2, 3]sprig.mustToDateSprig functionsprig.mustToDate(layout text, text) dateParses text into a date, or fails if it doesn't match the layout.
sprig.mustToDate('2006-01-02', '2024-01-01').Year() == 2024sprig.mustToJsonSprig functionsprig.mustToJson(value) textTurns a value into JSON text, or fails if it can't be.
sprig.mustFromJson(sprig.mustToJson('hi')) == 'hi'sprig.mustToPrettyJsonSprig functionsprig.mustToPrettyJson(value) textTurns a value into indented JSON text, or fails if it can't be.
sprig.mustFromJson(sprig.mustToPrettyJson('hi')) == 'hi'sprig.mustToRawJsonSprig functionsprig.mustToRawJson(value) textTurns a value into JSON text without HTML escaping, or fails if it can't be.
sprig.mustFromJson(sprig.mustToRawJson('hi')) == 'hi'sprig.mustUniqSprig functionsprig.mustUniq(list) listDrops repeated values out of a list, or fails if it isn't a list.
sprig.mustUniq([1, 2, 2, 3]) == [1, 2, 3]sprig.mustWithoutSprig functionsprig.mustWithout(list, ...values) listDrops matching values out of a list, or fails if it isn't a list.
sprig.mustWithout([1, 2, 3], 2) == [1, 3]sprig.nindentSprig functionsprig.nindent(spaces number, text) textSame as indent, but with a newline in front too.
sprig.nindent(2, 'a: 1') == '\n a: 1'sprig.nospaceSprig functionsprig.nospace(text) textRemoves every whitespace character from text.
sprig.nospace('a b c') == 'abc'sprig.nowSprig functionsprig.now() timeGives the current date and time.
sprig.now().Year() > 2000sprig.omitSprig functionsprig.omit(dict, ...keys) dictDrops the named keys from a dict.
len(sprig.omit(sprig.dict('a', 1, 'b', 2), 'a')) == 1 && sprig.omit(sprig.dict('a', 1, 'b', 2), 'a')['b'] == 2sprig.osBaseSprig functionsprig.osBase(path text) textGives the last element of a path, using this server's path style.
sprig.osBase('/foo/bar/baz.txt') == 'baz.txt'sprig.osCleanSprig functionsprig.osClean(path text) textSimplifies a path, using this server's path style.
sprig.osClean('/foo/../bar//baz') == '/bar/baz'sprig.osDirSprig functionsprig.osDir(path text) textGives every element of a path except the last, using this server's path style.
sprig.osDir('/foo/bar/baz.txt') == '/foo/bar'sprig.osExtSprig functionsprig.osExt(path text) textGives the file extension of a path, using this server's path style.
sprig.osExt('/foo/bar.txt') == '.txt'sprig.osIsAbsSprig functionsprig.osIsAbs(path text) boolReports whether a path is absolute, using this server's path style.
sprig.osIsAbs('/foo/bar') == truesprig.pickSprig functionsprig.pick(dict, ...keys) dictKeeps only the named keys of a dict.
len(sprig.pick(sprig.dict('a', 1, 'b', 2), 'a')) == 1 && sprig.pick(sprig.dict('a', 1, 'b', 2), 'a')['a'] == 1sprig.pluckSprig functionsprig.pluck(key text, dict, ...) listReads one key from several dicts, giving a list of the values found.
sprig.pluck('a', sprig.dict('a', 1), sprig.dict('a', 2)) == [1, 2]sprig.pluralSprig functionsprig.plural(one text, many text, count number) textPicks the singular or plural word for a count.
sprig.plural('apple', 'apples', 2) == 'apples'sprig.prependSprig functionsprig.prepend(list, value) listAdds a value onto the front of a list, giving a new list.
sprig.prepend([2, 3], 1) == [1, 2, 3]sprig.pushSprig functionsprig.push(list, value) listAdds a value onto the end of a list, giving a new list.
sprig.push([1, 2], 3) == [1, 2, 3]sprig.quoteSprig functionsprig.quote(value, ...) textWraps each value in double quotes and joins them with a space.
sprig.quote('a', 'b') == '"a" "b"'sprig.randAlphaSprig functionsprig.randAlpha(length number) textMakes a random string of letters.
len(sprig.randAlpha(8)) == 8sprig.randAlphaNumSprig functionsprig.randAlphaNum(length number) textMakes a random string of letters and digits.
len(sprig.randAlphaNum(8)) == 8sprig.randAsciiSprig functionsprig.randAscii(length number) textMakes a random string of ASCII characters.
len(sprig.randAscii(8)) == 8sprig.randBytesSprig functionsprig.randBytes(count number) textMakes random bytes, base64-encoded.
len(sprig.b64dec(sprig.randBytes(8))) == 8sprig.randIntSprig functionsprig.randInt(min number, max number) numberPicks a random whole number in a range, including the low end and excluding the high end.
sprig.randInt(5, 6) == 5sprig.randNumericSprig functionsprig.randNumeric(length number) textMakes a random string of digits.
len(sprig.randNumeric(8)) == 8sprig.regexFindSprig functionsprig.regexFind(pattern text, text) textFinds the first match of a regular expression in text.
sprig.regexFind('[0-9]+', 'a123b') == '123'sprig.regexFindAllSprig functionsprig.regexFindAll(pattern text, text, limit number) listFinds every match of a regular expression in text, up to a limit (-1 for no limit).
sprig.regexFindAll('[0-9]+', 'a1 b22 c333', -1) == ['1', '22', '333']sprig.regexMatchSprig functionsprig.regexMatch(pattern text, text) boolReports whether text matches a regular expression.
sprig.regexMatch('^[a-z]+$', 'abc') == truesprig.regexQuoteMetaSprig functionsprig.regexQuoteMeta(text) textEscapes the regular expression special characters in text, so it can be matched literally.
sprig.regexMatch(sprig.regexQuoteMeta('a.b*c'), 'a.b*c') == truesprig.regexReplaceAllSprig functionsprig.regexReplaceAll(pattern text, text, replacement text) textReplaces every match of a regular expression with a replacement, which may use $1 for groups.
sprig.regexReplaceAll('[0-9]+', 'a123b456', 'X') == 'aXbX'sprig.regexReplaceAllLiteralSprig functionsprig.regexReplaceAllLiteral(pattern text, text, replacement text) textReplaces every match of a regular expression with a replacement, taken literally rather than as $1-style groups.
sprig.regexReplaceAllLiteral('([a-z]+)', 'abc', '$1$1') == '$1$1'sprig.regexSplitSprig functionsprig.regexSplit(pattern text, text, limit number) listSplits text at each match of a regular expression, up to a limit (-1 for no limit).
sprig.regexSplit(' +', 'a b c', -1) == ['a', 'b', 'c']sprig.repeatSprig functionsprig.repeat(count number, text) textRepeats text a number of times.
sprig.repeat(3, 'ab') == 'ababab'sprig.replaceSprig functionsprig.replace(old text, new text, text) textReplaces every occurrence of one piece of text with another.
sprig.replace('l', 'L', 'hello') == 'heLLo'sprig.restSprig functionsprig.rest(list) listGives every item of a list except the first.
sprig.rest([1, 2, 3]) == [2, 3]sprig.reverseSprig functionsprig.reverse(list) listReverses the order of a list.
sprig.reverse([1, 2, 3]) == [3, 2, 1]sprig.roundSprig functionsprig.round(number, places number) numberRounds a number to a given number of decimal places.
sprig.round(3.14159, 2) == 3.14sprig.semverSprig functionsprig.semver(version text) versionParses a semantic version string.
sprig.semver('1.2.3').String() == '1.2.3'sprig.semverCompareSprig functionsprig.semverCompare(constraint text, version text) boolReports whether a version satisfies a constraint, such as >=1.0.0.
sprig.semverCompare('>=1.0.0', '1.2.3') == truesprig.seqSprig functionsprig.seq(...numbers) textBuilds a space-separated list of numbers, like a start, step and stop.
sprig.seq(3) == '1 2 3'sprig.setSprig functionsprig.set(dict, key text, value) dictSets a key on a dict, giving the same dict back.
sprig.set(sprig.dict('a', 1), 'b', 2)['b'] == 2sprig.sha1sumSprig functionsprig.sha1sum(text) textHashes text with SHA-1, as hex.
len(sprig.sha1sum('abc')) == 40sprig.sha256sumSprig functionsprig.sha256sum(text) textHashes text with SHA-256, as hex.
len(sprig.sha256sum('abc')) == 64sprig.sha512sumSprig functionsprig.sha512sum(text) textHashes text with SHA-512, as hex.
len(sprig.sha512sum('abc')) == 128sprig.shuffleSprig functionsprig.shuffle(text) textPuts the characters of text in a random order.
len(sprig.shuffle('abcdef')) == 6sprig.sliceSprig functionsprig.slice(list, start number, end number) listTakes a slice of a list between two positions.
sprig.slice([1, 2, 3, 4, 5], 1, 3) == [2, 3]sprig.snakecaseSprig functionsprig.snakecase(text) textTurns CamelCase text into snake_case.
sprig.snakecase('CamelCase') == 'camel_case'sprig.sortAlphaSprig functionsprig.sortAlpha(list) listSorts a list of text alphabetically.
sprig.sortAlpha(['b', 'a', 'c']) == ['a', 'b', 'c']sprig.splitSprig functionsprig.split(sep text, text) dictSplits text at a separator into a dict keyed _0, _1, and so on.
sprig.split(',', 'a,b')['_0'] == 'a' && sprig.split(',', 'a,b')['_1'] == 'b'sprig.splitListSprig functionsprig.splitList(sep text, text) listSplits text at a separator into a list.
sprig.splitList(',', 'a,b,c') == ['a', 'b', 'c']sprig.splitnSprig functionsprig.splitn(sep text, n number, text) dictSplits text at a separator into at most n pieces, as a dict keyed _0, _1, and so on.
sprig.splitn(',', 2, 'a,b,c')['_0'] == 'a' && sprig.splitn(',', 2, 'a,b,c')['_1'] == 'b,c'sprig.squoteSprig functionsprig.squote(value, ...) textWraps each value in single quotes and joins them with a space.
sprig.squote('a', 'b') == "'a' 'b'"sprig.subSprig functionsprig.sub(a number, b number) numberSubtracts one number from another.
sprig.sub(5, 2) == 3sprig.subfSprig functionsprig.subf(a number, ...numbers) numberSubtracts numbers with decimals from the first one.
sprig.subf(5.5, 2) == 3.5sprig.substrSprig functionsprig.substr(start number, end number, text) textTakes a slice of text between two positions.
sprig.substr(0, 3, 'hello') == 'hel'sprig.swapcaseSprig functionsprig.swapcase(text) textSwaps upper case letters to lower case and back.
sprig.swapcase('Hello') == 'hELLO'sprig.ternarySprig functionsprig.ternary(whenTrue, whenFalse, condition bool) anyPicks one of two values based on a condition.
sprig.ternary('yes', 'no', true) == 'yes'sprig.titleSprig functionsprig.title(text) textCapitalizes the first letter of each word.
sprig.title('hello world') == 'Hello World'sprig.toDateSprig functionsprig.toDate(layout text, text) dateParses text into a date, using this server's local time zone.
sprig.toDate('2006-01-02', '2024-01-01').Year() == 2024sprig.toDecimalSprig functionsprig.toDecimal(text) numberReads text as a Unix-style octal number and gives it back as decimal.
sprig.toDecimal('755') == 493sprig.toJsonSprig functionsprig.toJson(value) textTurns a value into JSON text.
sprig.fromJson(sprig.toJson('hi')) == 'hi'sprig.toPrettyJsonSprig functionsprig.toPrettyJson(value) textTurns a value into indented JSON text.
sprig.fromJson(sprig.toPrettyJson('hi')) == 'hi'sprig.toRawJsonSprig functionsprig.toRawJson(value) textTurns a value into JSON text, without escaping HTML characters like < and &.
sprig.fromJson(sprig.toRawJson('hi')) == 'hi'sprig.toStringSprig functionsprig.toString(value) textTurns a value into text.
sprig.toString(42) == '42'sprig.toStringsSprig functionsprig.toStrings(list) listTurns a list of any values into a list of text.
sprig.toStrings([1, 2, 3]) == ['1', '2', '3']sprig.trimSprig functionsprig.trim(text) textRemoves leading and trailing whitespace.
sprig.trim(' hi ') == 'hi'sprig.trimallSprig functionsprig.trimall(cutset text, text) textRemoves any of a set of characters from both ends of text. Deprecated in favor of trimAll.
sprig.trimall('$', '$$hi$$') == 'hi'sprig.trimAllSprig functionsprig.trimAll(cutset text, text) textRemoves any of a set of characters from both ends of text.
sprig.trimAll('$', '$$hi$$') == 'hi'sprig.trimPrefixSprig functionsprig.trimPrefix(prefix text, text) textRemoves a prefix from text, if it has one.
sprig.trimPrefix('/root/', '/root/path') == 'path'sprig.trimSuffixSprig functionsprig.trimSuffix(suffix text, text) textRemoves a suffix from text, if it has one.
sprig.trimSuffix('.txt', 'file.txt') == 'file'sprig.truncSprig functionsprig.trunc(n number, text) textCuts text to a length. A negative length keeps that many characters from the end.
sprig.trunc(3, 'hello') == 'hel'sprig.tupleSprig functionsprig.tuple(value, ...) listBuilds a list out of the values given. Same as list.
sprig.tuple(1, 2, 3) == [1, 2, 3]sprig.typeIsSprig functionsprig.typeIs(type text, value) boolReports whether a value is a named Go type.
sprig.typeIs('string', 'hi') == truesprig.typeIsLikeSprig functionsprig.typeIsLike(type text, value) boolSame as typeIs, but also matches a pointer to that type.
sprig.typeIsLike('string', 'hi') == truesprig.typeOfSprig functionsprig.typeOf(value) textNames the Go type of a value.
sprig.typeOf('hi') == 'string'sprig.uniqSprig functionsprig.uniq(list) listDrops repeated values out of a list.
sprig.uniq([1, 2, 2, 3]) == [1, 2, 3]sprig.unixEpochSprig functionsprig.unixEpoch(date) textGives the Unix timestamp of a date, as text.
int(sprig.unixEpoch(sprig.now())) > 1600000000sprig.unsetSprig functionsprig.unset(dict, key text) dictRemoves a key from a dict, giving the same dict back.
sprig.hasKey(sprig.unset(sprig.dict('a', 1, 'b', 2), 'b'), 'b') == falsesprig.untilSprig functionsprig.until(count number) listCounts from 0 up to (not including) a number, as a list.
toJson(sprig.until(3)) == '[0,1,2]'sprig.untilStepSprig functionsprig.untilStep(start number, stop number, step number) listCounts from a start up to a stop, by a step, as a list.
toJson(sprig.untilStep(0, 10, 4)) == '[0,4,8]'sprig.untitleSprig functionsprig.untitle(text) textLowercases the first letter of text.
sprig.untitle('Hello') == 'hello'sprig.upperSprig functionsprig.upper(text) textTurns text to upper case.
sprig.upper('abc') == 'ABC'sprig.urlJoinSprig functionsprig.urlJoin(dict) textBuilds a URL out of a dict of parts.
sprig.urlJoin(sprig.dict('scheme', 'https', 'host', 'example.com', 'path', '/x')) == 'https://example.com/x'sprig.urlParseSprig functionsprig.urlParse(url text) dictBreaks a URL down into a dict of its parts.
sprig.urlParse('https://example.com/path?q=1')['host'] == 'example.com'sprig.uuidv4Sprig functionsprig.uuidv4() textMakes a random version 4 UUID.
len(sprig.uuidv4()) == 36sprig.valuesSprig functionsprig.values(dict) listLists the values of a dict.
len(sprig.values(sprig.dict('a', 1, 'b', 2))) == 2 && 1 in sprig.values(sprig.dict('a', 1, 'b', 2))sprig.withoutSprig functionsprig.without(list, ...values) listDrops matching values out of a list.
sprig.without([1, 2, 3], 2) == [1, 3]sprig.wrapSprig functionsprig.wrap(width number, text) textWraps text onto new lines so no line is longer than a width.
sprig.contains('\n', sprig.wrap(5, 'a b c d e')) == truesprig.wrapWithSprig functionsprig.wrapWith(width number, sep text, text) textWraps text at a width, joining the lines with a separator you choose instead of a newline.
sprig.contains('|', sprig.wrapWith(5, '|', 'a b c d e')) == truestringexpr-lang builtinstring(value) textTurns a value into text.
string(123) == '123'sumexpr-lang builtinsum(list) numberAdds up the numbers in a list.
sum([1, 2, 3]) == 6takeexpr-lang builtintake(list, n number) listGives the first n elements of a list.
take([1, 2, 3, 4], 2) == [1, 2]timezoneexpr-lang builtintimezone(name text) timezoneLooks up a named time zone, for use with dates.
timezone('UTC') != niltoBase64expr-lang builtintoBase64(text) textEncodes text as base64.
toBase64('Hello World') == 'SGVsbG8gV29ybGQ='toJsonArgo functiontoJson(value) textTurns a value into JSON text
toJson(asInt('1')) == '1'toJSONexpr-lang builtintoJSON(value) textTurns a value into indented JSON text.
{'name': 'John'} == fromJSON(toJSON({'name': 'John'}))toPairsexpr-lang builtintoPairs(dict) listTurns a dict into a list of [key, value] pairs.
toPairs({'name': 'John'})[0][0] == 'name' && toPairs({'name': 'John'})[0][1] == 'John'trimexpr-lang builtintrim(text, chars text) textRemoves whitespace, or a given set of characters, from both ends of text.
trim(' Hello ') == 'Hello'trimPrefixexpr-lang builtintrimPrefix(text, prefix text) textRemoves a prefix from text, if it has one.
trimPrefix('HelloWorld', 'Hello') == 'World'trimSuffixexpr-lang builtintrimSuffix(text, suffix text) textRemoves a suffix from text, if it has one.
trimSuffix('HelloWorld', 'World') == 'Hello'typeexpr-lang builtintype(value) textNames the type of a value: nil, bool, int, uint, float, string, array or map.
type(42) == 'int'uniqexpr-lang builtinuniq(list) listDrops repeated values out of a list.
uniq([1, 2, 3, 2, 1]) == [1, 2, 3]upperexpr-lang builtinupper(text) textTurns text to upper case.
upper('hello') == 'HELLO'valuesexpr-lang builtinvalues(dict) listLists the values of a dict.
len(values({'name': 'John', 'age': 30})) == 2
No functions match your search.