StringParser

public class StringParser
Parse strings to numbers, distances and angles

Methods

ParseAngleExpession

#Since v6.0
public static int ParseAngleExpession(
expression,
start_offset,
expression_length,
parse_settings_in,
output_angle_unit_system,
out double
value_out,
parse_results,
parsed_unit_system
)

ParseAngleExpressionDegrees

#Since v6.0
public static bool ParseAngleExpressionDegrees(
expression,
out double
angle_degrees
)

ParseAngleExpressionRadians

#Since v6.0
public static bool ParseAngleExpressionRadians(
expression,
out double
angle_radians
)

ParseLengthExpession

#Since v6.0
Parse a string for a length value. Expression can include complex expressions Most complex version of length parsing
public static int ParseLengthExpession(
expression,
[In] The string to parse
start_offset,
[In] Offset position in string to start parsing
expression_length,
[In] Maximum length of string to parse. -1 means parse to a terminating character or end of string
parse_settings_in,
[In] Determines what input will be parsed
output_unit_system,
[In] Output value is returned in this unit system
out double
value_out,
[Out] The length value result
parse_results,
[Out] Describes the results of the parse operation
parsed_unit_system
[Out] If a unit system name was found in the string, it is returned here. The output value is in the unit system specified in output_unit_system
)
Returns the count of characters that were parsed or 0 if the operation was unsuccessful

ParseLengthExpession

#Since v6.0
Parse a string for a length value. Expression can include complex expressions Simplest version of Length parsing
public static int ParseLengthExpession(
expression,
[In] The string to parse
parse_settings_in,
[In] Determines what input will be parsed
output_unit_system,
[In] Output value is in this unit system
out double
value_out
[Out] The length value result
)
Count of characters parsed or 0 for failure

ParseNumber

#Since v6.0
Parse a string expression to get a number
public static int ParseNumber(
expression,
String to parse
max_count,
Maximum number of characters to parse
settings_in,
Determines what input will be parsed
settings_out,
Reports the results of the parse operation
out double
answer
The number result of the parse operation
)
Count of characters in expression parsed if ParseNumber() returns 0, parse was unsuccessful