Skip to content

concat

relationalai.semantics.std.strings
concat(s1: StringValue, s2: StringValue, *sn: StringValue) -> Expression

Concatenate multiple strings together.

Parameters

  • s1

    (StringValue) - The first string to concatenate.
  • s2

    (StringValue) - The second string to concatenate.
  • *sn

    (StringValue, default: ()) - Additional strings to concatenate.

Returns

  • Expression - An Expression representing the concatenated string. Returns String.

Examples

Concatenate strings together:

strings.concat("thing_", Thing.name)
strings.concat("Hello", " ", "World")

Referenced By

RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Use advanced reasoning > Rules-based reasoning
        └──  Work with strings
            └──  Build derived text values