Class StringExpr
- Namespace
- Invex.StructuredText.Expressions
- Assembly
- Invex.StructuredText.dll
An expression that evaluates to a string.
public abstract record StringExpr : Expr
- Inheritance
-
objectStringExpr
- Derived
- Inherited Members
Remarks
A plain string converts implicitly to a quoted, escaped string literal. Use Raw(string) for verbatim expression text.
Constructors
StringExpr()
protected StringExpr()
Methods
Contains(StringExpr)
Tests whether this value contains value.
public BoolExpr Contains(StringExpr value)
Parameters
valueStringExprThe substring to search for.
Returns
EndsWith(StringExpr)
Tests whether this value ends with value.
public BoolExpr EndsWith(StringExpr value)
Parameters
valueStringExprThe suffix to test for.
Returns
Eq(StringExpr)
Tests this value for equality with other.
public BoolExpr Eq(StringExpr other)
Parameters
otherStringExprThe value to compare with.
Returns
In(JsonExpr)
Tests whether this value is one of the elements of collection.
public BoolExpr In(JsonExpr collection)
Parameters
collectionJsonExprThe array-valued expression to search.
Returns
Ne(StringExpr)
Tests this value for inequality with other.
public BoolExpr Ne(StringExpr other)
Parameters
otherStringExprThe value to compare with.
Returns
StartsWith(StringExpr)
Tests whether this value starts with value.
public BoolExpr StartsWith(StringExpr value)
Parameters
valueStringExprThe prefix to test for.
Returns
Operators
implicit operator StringExpr(string)
Converts a string to a string literal.
public static implicit operator StringExpr(string value)
Parameters
valuestringThe literal value, unquoted.