startswith
relationalai.semantics.std.strings
startswith(s: StringValue, prefix: StringValue) -> ExpressionCheck whether s starts with prefix.
Parameters
Section titled “Parameters”
(sStringValue) - The string to check.
(prefixStringValue) - The prefix to check for.
Returns
Section titled “Returns”Expression- AnExpressionthat evaluates totrueifsstarts withprefix.
Examples
Section titled “Examples”Filter strings that start with a prefix:
>>> select(Person.name).where(strings.startswith(Person.last_name, Person.name))Referenced By
Section titled “Referenced By”RelationalAI Documentation └── Build With RelationalAI └── Understand how PyRel works > Use advanced reasoning > Rules-based reasoning └── Work with strings └── Filter facts with text conditions