Table of Contents

Class EzrString

Namespace
EzrSquared.Runtime.Types.Core.Text
Assembly
ezrSquared-lib.dll

The string type object.

public class EzrString : EzrObject, IEzrString, IEzrIndexedCollection, IEzrEnumerable, IEzrObject
Inheritance
object
EzrString
Implements
Inherited Members

Constructors

EzrString(string, Context, Position, Position)

Creates a new EzrString.

public EzrString(string value, Context parentContext, Position startPosition, Position endPosition)

Parameters

value string

The base value.

parentContext Context

The parent context.

startPosition Position

The starting position of the object.

endPosition Position

The ending position of the object.

Fields

Value

The string value.

public readonly string Value

Field Value

string

Properties

Count

Gets the number of elements in the collection.

[WrapMember("length", false, false)]
public int Count { get; }

Property Value

int

The number of elements in the collection.

StringValue

The string value.

public string StringValue { get; }

Property Value

string

Tag

The tag of the type of this object, similar to C# namespace naming conventions.

public override string Tag { get; protected internal set; }

Property Value

string

TypeName

The name of the type of this object, in plain text, all lowercase. Spaces are allowed.

public override string TypeName { get; protected internal set; }

Property Value

string

Methods

Addition(IEzrObject, RuntimeResult)

Creates a copy of the current object with the string representation of the other object appended.

public override void Addition(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

At(int)

Gets the object at the specified index.

public IEzrObject At(int index)

Parameters

index int

The index.

Returns

IEzrObject

The object at the index.

Compare(IEzrIndexedCollection)

Compares the current string with another collection.

private bool Compare(IEzrIndexedCollection other)

Parameters

other IEzrIndexedCollection

The other collection.

Returns

bool

The result of the comparison.

ComparisonEqual(IEzrObject, RuntimeResult)

Compares the object to another, checks equality.

public override void ComparisonEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonGreaterThan(IEzrObject, RuntimeResult)

Compares the object to another, checks if the current object is greater than the other.

public override void ComparisonGreaterThan(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonGreaterThanOrEqual(IEzrObject, RuntimeResult)

Compares the object to another, checks if the current object is greater than or equal to the other.

public override void ComparisonGreaterThanOrEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonLessThan(IEzrObject, RuntimeResult)

Gets the character(s) at the specified index/indices OR compares the current object to other stringlike objects, checks if this is less than the other.

public override void ComparisonLessThan(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonLessThanOrEqual(IEzrObject, RuntimeResult)

Gets the character(s) at the specified index/indices OR compares the current object to other stringlike objects, checks if this is less than the other.

public override void ComparisonLessThanOrEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonNotEqual(IEzrObject, RuntimeResult)

Compares the object to another, checks unequality.

public override void ComparisonNotEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComputeHashCode(RuntimeResult)

Evaluates the current object as its hash.

public override int ComputeHashCode(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

int

The evaluated value.

Division(IEzrObject, RuntimeResult)

Performs the division operation between the current object and another.

public override void Division(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

Remarks

Here, "divide" means "duplicate/decrease the current value X times".

EvaluateBoolean(RuntimeResult)

Evaluates the current object as a boolean value.

public override bool EvaluateBoolean(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

bool

The evaluated value.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<IEzrObject> GetEnumerator()

Returns

IEnumerator<IEzrObject>

An enumerator that can be used to iterate through the collection.

GetEnumerator(RuntimeResult)

Similar to System.Collections.Generic.IEnumerable<T>.GetEnumerator().

public IEnumerator<IEzrObject> GetEnumerator(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying errors.

Returns

IEnumerator<IEzrObject>

The System.Collections.Generic.IEnumerator<T>.

Remarks

Use this when exposing the enumerator to the ezrĀ² runtime. For example, this is used by EzrDictionary to copy read-only keys so that they can't be edited at runtime.

HasValueContained(IEzrObject, RuntimeResult)

Checks if the other object is contained in the current object.

public override void HasValueContained(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

Multiplication(IEzrObject, RuntimeResult)

Performs the multiplication operation between the current object and another.

public override void Multiplication(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

Remarks

Here, "multiply" means "duplicate/decrease the current value X times".

NotHasValueContained(IEzrObject, RuntimeResult)

Checks if the other object is NOT contained in the current object.

public override void NotHasValueContained(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

StrictEquals(IEzrObject, RuntimeResult)

Strictly compares the current object to another, taking into account inheritance.

public override bool StrictEquals(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying any errors.

Returns

bool

Subtraction(IEzrObject, RuntimeResult)

Creates a copy of the current object with the character(s) at the specified index/indices removed.

public override void Subtraction(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ToPureString(RuntimeResult)

Evaluates the current object as a string value.

public override string ToPureString(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

string

The evaluated value.

Remarks

This is used to show the 'real' string representation of the object. Like, for example, ToString(RuntimeResult) will
return "example" when called on an EzrString object with value "example", but this function will return example (without quotes).

ToString(RuntimeResult)

Evaluates the current object as a string value.

public override string ToString(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

string

The evaluated value.