New String Functions Added to the Standard Library
The Standard Library (opens in a new tab) has been updated and expanded to include various new String functionalities to better handle and manipulate string data. New functions include:
Name | Description |
---|---|
string_join | Concatenates String or Character data. |
string_replace | Searches for a string pattern and replaces it. |
string_trim | Trims string by deleting leading and trailing whitespaces. |
concat | oncatenates two strings. |
char / byte | Returns the character at a specific index/byte position. |
num_chars / num_bytes | Count the characters/bytes of a string. |
A few examples seeing these new functions in action:
// read query
def output[1] = concat["Hello ", "World"] // "Hello World"
def output[2] = string_join[", ",
{(1, "a"); (2, "b"); (3, "c")}
] // "a, b, c"
Relation:
// read query
def output[1] = string_trim[" This works "] // "This works"
def output[2] = string_replace["rAI", 'r', 'R'] // "RAI"
// read query
def output[1] = num_chars["中文例子"] // 4
def output[2] = char["grün", 3] // 'ü'
Related Posts
Accelerating AI Adoption With Explainability in SaMD
Many recognize the potential of artificial intelligence (AI) in healthcare and life sciences. Some early adopters are starting to reap the benefits already, especially in fields such as radiology and digital pathology.
RAI Platform Pillars
RelationalAI is the first and only Relational Knowledge Graph System that has the modern table stakes of a cloud-native architecture and has an expressive and complete declarative relational language.