Skip to content

String

String supports addition, comparison, matching, and size functions.

new String(inner): String

string

String

add(other): Val

Add returns a combination of the current value and other value.

Val

Val

Adder.add


compare(other): Val

Compare this value to the input other value.

Val

Val

Comparer.compare


convertToNative(typeDesc?): unknown

ConvertToNative converts the Value to a native TypeScript value according to the provided type description, or throws if the conversion is not feasible.

unknown

unknown

Val.convertToNative


convertToType(typeValue): Val

ConvertToType supports type conversions between CEL value types supported by the expression language.

RefType

Val

Val.convertToType


equal(other): Val

Equal returns true if the other value has the same type and content as the implementing value.

Val

Val

Val.equal


isZeroValue(): boolean

IsZeroValue returns true if the string is empty.

boolean


match(pattern): Val

Match returns true if the pattern matches the current value.

Val

Val

Matcher.match


receive(functionName, _overload, args): Val

Receive accepts a function name, overload id, and arguments and returns a value.

string

string

Val[]

Val

Receiver.receive


size(): Val

Size returns the number of elements or length of the value.

Val

Sizer.size


type(): RefType

Type returns the TypeValue of the value.

RefType

Val.type


value(): string

Value returns the raw value of the instance which may not be directly compatible with the expression language types.

string

Val.value