Text Class

This class represents Text and all the available functionality around it.

Definition

Namespace: Firefly.Box
Assembly: Firefly.Box (in Firefly.Box.dll) Version: debug-master-v:33791
C#
public class Text : DataTypeBase, IComparable, IEnumerable<char>, 
	IEnumerable
Inheritance
Object    DataTypeBase    Text
Implements
IEnumerableChar, IEnumerable, IComparable

Remarks

Note that Text comparison is done using trim end on both values, such as "abc" and "abc " are considered equal.

Constructors

Text(String)Initializes a new instance of the Text class.
Text(Char, Int32) Initializes a new instance of the Text class to the value indicated by a specified char repeated a specified number of times.
Text(Text, Int32) Initializes a new instance of the Text class to the value indicated by a specified text repeated a specified number of times.

Properties

Empty Represents an empty Text
Item Gets the character at a specified character position in this instance.
Length Gets the Text length.
StopProcessingFormatOnCharF 
TextComparer 

Methods

CastCasts the object specified in the basedOn parameter to a Text. If the cast fails an InvalidCastException is thrown
Compare 
CompareToCompares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
(Overrides DataTypeBaseCompareTo(Object))
Contains Checks if the Text contains the textToLookFor
Equals(Object)Determines whether the specified Object is equal to the current Object.
(Overrides ObjectEquals(Object))
Equals(Text) 
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetEnumeratorReturns an enumerator that iterates through a collection.
GetHashCodeServes as a hash function for a particular type.
(Overrides ObjectGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IndexOf(Char) 
IndexOf(Text) Returns the index of the first occurrence of the textToLookFor
Insert Inserts a specified instance of Text at a specified index position in this instance
IsNullOrEmpty 
IsNullOrWhiteSpace 
IsSpecialNullInstance 
Left Returns the numOfChars characters from the start of the text
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
PadRight 
Remove(Int32) 
Remove(Int32, Int32) Removes characters from the string.
Replace Replaces all the occurrences of the textToLookFor with the textToReplace
Reverse Returns a flipped copy of this text
Right Returns the numOfChars characters from the end of the text.
StartsWith 
Substring(Int32) Retrieves a substring from this instance.
Substring(Int32, Int32) Retrieves a substring from this instance.
ToLower Returns a copy of the text in lowercase
ToStringReturns a String that represents the current Text.
(Overrides ObjectToString)
ToString(String)Returns a String that represents the current Text. The result string is formatted using the format provided in the format parameter.
(Overrides DataTypeBaseToString(String))
ToString(String, IFormatProvider)Returns a String that represents the value specified in format. The result string is formatted using the format provided in the format parameter.
(Inherited from DataTypeBase)
ToText 
ToUpper Returns a copy of the text in uppercase
ToUpper(CultureInfo) Returns a copy of the text in uppercase
Trim Returns a trimmed version of the text.
Trim(Char) 
TrimEnd Returns the text without space characters at the end
TrimEnd(Char) 
TrimStart Returns the text without space characters at the start
TrimStart(Char) 
TryCastTries to cast the object specified in the basedOn parameter to a Boolean.

Operators

Extension Methods

ShouldBeVerifies that the actual value matches the expected value
(Defined by Should)
ShouldBeArray
(Defined by Should)

See Also