Class PatternTools
Static class used to build a non repeating pattern and identify the position of a string in a non repeating pattern.
Inheritance
System.Object
PatternTools
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ERC.Utilities
Assembly: ERC.Net.dll
Syntax
public static class PatternTools
Methods
PatternCreate(Int32, ErcCore, Boolean)
Creates a string of non repeating characters.
Declaration
public static ErcResult<string> PatternCreate(int length, ErcCore core, bool extended = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | length | The length of the pattern to be created as integer |
ErcCore | core | An ErcCore object |
System.Boolean | extended | (Optional) bool specifying whether the extended character set should be used |
Returns
Type | Description |
---|---|
ErcResult<System.String> | Returns an ErcResult string containing the generated pattern |
PatternOffset(String, ErcCore, Boolean)
Takes a string of characters and returns the location of the first character in a pattern created by Pattern_Create.
Declaration
public static ErcResult<string> PatternOffset(string pattern, ErcCore core, bool extended = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | pattern | The pattern to be searched for. |
ErcCore | core | An ErcCore object |
System.Boolean | extended | (Optional) bool specifying whether the extended character set should be used |
Returns
Type | Description |
---|---|
ErcResult<System.String> | Returns an ErcResult int containing the offset of the supplied pattern within the generated pattern |