Skip to content

concat

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

Concatenate multiple strings together.

  • s1

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

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

    (StringValue, default: ()) - Additional strings to concatenate.
  • Expression - An Expression representing the concatenated string. Returns String.

Concatenate strings together:

>>> strings.concat("thing_", Thing.name)
>>> strings.concat("Hello", " ", "World")
RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Use advanced reasoning > Rules-based reasoning
        └──  Work with strings
            └──  Build derived text values