[This is preliminary documentation and is subject to change.]
This class contains a mixed bunch of static utility methods with
nowhere else to go.
| C# |
public static class Utl
| All Members | Methods | ||||
| Icon | Member | Description |
|---|---|---|
| CamelCase(String) | Converts a word list into a single word in camel case. | |
| Crop(String, Int32) | Crops characters from the start or end of a string. | |
| EnumFlagsExpression(Enum, String, Boolean) | Creates a code expression containing all the text values of an
enum value of an enum type with the [FlagsAttribute] set. | |
| ExceptionText(Exception) | Obtains the messages of an exception and all its inner
exceptions, one per line. | |
| ExceptionText(Exception, Boolean) | Obtains the messages and optionally full details of an exception
and all its inner exceptions. | |
| FileToByteArray(String) | Reads the contents of a file into a byte array. | |
| FindByName(array<String>[]()[][], Int32%, NameFinder) | Finds an object with a multi-word name which matches one or more
of the words in set of name words. | |
| FindLoadedAssembly(String) | Finds a particular loaded assembly in the current application
domain. | |
| Format(String, array<Object>[]()[][]) | Performs simple string formatting similar to String.Format.
| |
| FormatTextOrdinal(Int32) | Returns the text ordinal for a particular number, for example
'first', 'second', 'twentieth' or 'eighty-third'. Hyphens are always
included where appropriate. | |
| Get2IntParameters(TargetLanguage, String, Int32%, Int32%) | Retrieves the values of two integer parameters from the source
code of a method call. | |
| GetDataFolder(array<String>[]()[][]) | Returns the path to a folder under the current user's roaming
application data folder. The specified folder is created if it does not
exist. | |
| GetResourceStream(Assembly, String) | Opens a stream to read a file embedded in an assembly as a
resource. | |
| IsValidFileName(String) | Determines whether a name is a valid file name. | |
| IsValidFolderPath(String) | Determines whether a string is a valid folder path. | |
| IsValidIdentifier(String, Boolean) | Determines whether a name is a valid identifier. This uses the
standard Unicode definition of identifiers. | |
| Join(String, array<String>[]()[][]) | Joins a set of strings separated by another string. | |
| MatchPattern(String, String) | Matches a pattern against a string, and returns the part of this
string corresponding to a placeholder. | |
| MatchPosition(String, String) | Matches a pattern against a string, and returns the position of
the part of this string corresponding to a placeholder. | |
| MultiValueText(IMultiValue) | Produces a string representation of an IMultiValue struct
generated for a multi value data class. This method is usually called from
generated code. | |
| OutputStackTrace(String) | Writes a formatted trace of the current stack to the console.
| |
| ParseFloatLiteral(String, Single%) | Parses a floating point literal from source code, returning the
value. | |
| ParseMultiValue(String, array<ISourcePair>[]()[][], Boolean) | Parses a string value for a struct generated for a multi-value
data class. This method is usually called from generated code.
| |
| ParseTextOrdinal(String) | Parses a text version of an ordinal number to give that number.
Only text ordinals from first to ninetyninth are parsed | |
| PascalCase(String) | Converts a word list into a single word in Pascal case.
| |
| PersistateFileVersion(String, String) | Obtains the full path and file name of a specific version of a
Persistate runtime file. | |
| PluralOf(String) | Finds the plural of a given noun or noun phrase. | |
| Proper(String) | Converts a one word string to proper case. | |
| ReadEmbeddedTextResource(Assembly, String) | Reads the contents of a text file included in an assembly as an
embedded resource. | |
| RoundToMultipleOf(Int32, Int32) | Rounds one number to the nearest multiple of another number.
| |
| SaveVersion(String) | Saves a numbered version of a file. | |
| ServerUri(String, String, String) | Obtains the Uri to use to connect to or listen for Persistate
Server/Viewer communications for running a particular package in a
particular environment. | |
| ServerUri(String, Environment, Package) | Obtains the Uri to use to connect to or listen for Persistate
Server/Viewer communications for running a particular package in a
particular environment. | |
| Split(String, String, Boolean) | This splits a string into tokens using any of the characters in a
string as separator characters. | |
| TitleCase(String) | Puts a string into title case. | |
| UnProper(String) | Removes proper case from a one word string. |
| Object | |
| Utl | |