Methods
public static int ParseAngleExpession(string expression, int start_offset, int expression_length, StringParserSettings parse_settings_in, AngleUnitSystem output_angle_unit_system, out double value_out, ref StringParserSettings parse_results, ref AngleUnitSystem parsed_unit_system)
Parameters:
| expression (string) | |
| start_offset (int) | |
| expression_length (int) | |
| parse_settings_in (StringParserSettings) | |
| output_angle_unit_system (AngleUnitSystem) | |
| value_out (out double) | |
| parse_results (ref StringParserSettings) | |
| parsed_unit_system (ref AngleUnitSystem) |
public static int ParseLengthExpession(string expression, int start_offset, int expression_length, StringParserSettings parse_settings_in, UnitSystem output_unit_system, out double value_out, ref StringParserSettings parse_results, ref UnitSystem parsed_unit_system)
Parse a string for a length value. Expression can include complex expressions Most complex version of length parsing
Parameters:
| expression (string) | [In] The string to parse |
| start_offset (int) | [In] Offset position in string to start parsing |
| expression_length (int) | [In] Maximum length of string to parse. -1 means parse to a terminating character or end of string |
| parse_settings_in (StringParserSettings) | [In] Determines what input will be parsed |
| output_unit_system (UnitSystem) | [In] Output value is returned in this unit system |
| value_out (out double) | [Out] The length value result |
| parse_results (ref StringParserSettings) | [Out] Describes the results of the parse operation |
| parsed_unit_system (ref UnitSystem) | [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: Returns the count of characters that were parsed or 0 if the operation was unsuccessful
public static int ParseLengthExpession(string expression, StringParserSettings parse_settings_in, UnitSystem output_unit_system, out double value_out)
Parse a string for a length value. Expression can include complex expressions Simplest version of Length parsing
Parameters:
| expression (string) | [In] The string to parse |
| parse_settings_in (StringParserSettings) | [In] Determines what input will be parsed |
| output_unit_system (UnitSystem) | [In] Output value is in this unit system |
| value_out (out double) | [Out] The length value result |
Returns: Count of characters parsed or 0 for failure
public static int ParseNumber(string expression, int max_count, StringParserSettings settings_in, ref StringParserSettings settings_out, out double answer)
Parse a string expression to get a number
Parameters:
| expression (string) | String to parse |
| max_count (int) | Maximum number of characters to parse |
| settings_in (StringParserSettings) | Determines what input will be parsed |
| settings_out (ref StringParserSettings) | Reports the results of the parse operation |
| answer (out double) | The number result of the parse operation |
Returns: Count of characters in expression parsed if ParseNumber() returns 0, parse was unsuccessful