Vybe Documentation

Vybe Main page

 

Utility Classes

Vybe includes several utility classes for common tasks like performance measurement, pattern matching, and data conversion.

Stopwatch

Provides a set of methods and properties that you can use to accurately measure elapsed time.

Method / Property Description
Start Starts, or resumes, measuring elapsed time for an interval.
Stop Stops measuring elapsed time for an interval.
Reset Stops time interval measurement and resets the elapsed time to zero.
Restart Stops time interval measurement, resets the elapsed time to zero, and starts measuring elapsed time.
StartNew (Static) Initializes a new Stopwatch instance, sets the elapsed time property to zero, and starts measuring elapsed time.
ElapsedMilliseconds (Property) Gets the total elapsed time measured by the current instance, in milliseconds.
IsRunning (Property) Gets a value indicating whether the Stopwatch timer is running.

Regex

Represents an immutable regular expression.

Method Description
New(pattern, [options]) Initializes a new instance of the Regex class for the specified regular expression.
IsMatch(input) Indicates whether the regular expression finds a match in the specified input string.
Match(input) Searches the specified input string for the first occurrence of the regular expression.
Matches(input) Searches the specified input string for all occurrences of a regular expression.
Replace(input, replacement) In a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string.
Split(input) Splits an input string into an array of substrings at the positions defined by a regular expression pattern.

RegexOptions

Convert

Converts a base data type to another base data type.

Method Description
ToBase64String(input) Converts the value of a 8-bit unsigned integer array (or string) to its equivalent string representation that is encoded with base-64 digits.
FromBase64String(input) Converts the specified string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array (or string).
ToDateTime(value) Converts a specified value to a DateTime.

StringBuilder

Represents a mutable string of characters.

Method Description
Append(string) Appends a string to the end of the current StringBuilder.
AppendLine([string]) Appends a string followed by a line terminator to the end.
Insert(index, string) Inserts a string into the current StringBuilder at the specified index.
Remove(index, length) Removes the specified range of characters from the current StringBuilder.
Replace(old, new) Replaces all occurrences of a specified string with another specified string.
Clear() Removes all characters from the current StringBuilder instance.
ToString() Converts the value of the current StringBuilder to a String.
Length (Property) Gets or sets the length of the current StringBuilder object.