New York kdb Training 2019
Spaces still available. Register now to learn Kdb+.

kdb String Functions

kdb provides the following String manipultation functions:

likePerform simple pattern matching of[text; pattern]like[("kim";"kyle";"Jim"); "k*"]
lowerMonadic that converts strings and symbols to lower caselower[text]`small~lower `SMALL
ltrimMonadic that removes leading whitespace from strings.ltrim[text]"abc"~ltrim " abc"
rtrimMonadic that removes trailing whitespace from strings.rtrim[text]"abc"~rtrim "abc "
ssThe function ss finds positions of a substring within a string. It also supports some pattern matching capabilities of the function like: r:HayStack ss needle"toronto ontario" ss "ont"
ssrThe function ssr does search and replace on a string.r:ssr[haystack; needle; replacement]ssr["toronto ontario"; "ont"; "XX"]
svWhen applied to a vector of strings it returns the elements of its right argument-the list of strings-separated by the left argument."|" sv ("asdf";"hjkl")
trimMonadic that removes leading and trailing whitespace from strings.trim[text]"abc"~trim " abc "
upperMonadic that converts strings and symbols to upper caselower[text]`BIG~upper `big
vsWith a character or a string on the left hand side, it tokenizes a string on the right hand side using the left hand side as the specified delimiter. It returns a vector of substrings.","vs"one,two,three"