Method Parse
- Namespace
- Bonsai
- Assembly
- Bonsai.Core.dll
Parse(Expression, string)
Creates an Expression representing the result of parsing a string with the specified pattern.
public static Expression Parse(Expression expression, string pattern)
Parameters
expressionExpressionAn Expression that represents the string to parse.
patternstringThe parse pattern to match, including data type format specifiers. If
patternis null, the input string is returned.
Returns
- Expression
An Expression that represents the result of parsing the specified string.
Parse(Expression, string, params string[])
Creates an Expression representing the result of first splitting a string using separator tokens and then parsing each of the elements against the specified pattern.
public static Expression Parse(Expression expression, string pattern, params string[] separator)
Parameters
expressionExpressionAn Expression that represents the string to parse.
patternstringThe parse pattern to match, including data type format specifiers. If
patternis null, each of the resulting element strings is returned unchanged.separatorstring[]An optional array of delimiters used for splitting the string into individual elements before parsing. If the array is empty, the input string is parsed directly without further processing.
Returns
- Expression
An Expression that represents the result of splitting and parsing the specified string. If a separator array is specified, the resulting expression will be of type Array.