StringParserParseLengthExpession Method (String, Int32, Int32, StringParserSettings, UnitSystem, Double, StringParserSettings, UnitSystem) |
Parse a string for a length value.
Expression can include complex expressions
Most complex version of length parsing
Namespace:
Rhino.Input
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 6.0
Syntax 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
)
Public Shared Function ParseLengthExpession (
expression As String,
start_offset As Integer,
expression_length As Integer,
parse_settings_in As StringParserSettings,
output_unit_system As UnitSystem,
<OutAttribute> ByRef value_out As Double,
ByRef parse_results As StringParserSettings,
ByRef parsed_unit_system As UnitSystem
) As Integer
Parameters
- expression
- Type: SystemString
[In] The string to parse - start_offset
- Type: SystemInt32
[In] Offset position in string to start parsing - expression_length
- Type: SystemInt32
[In] Maximum length of string to parse.
-1 means parse to a terminating character or end of string
- parse_settings_in
- Type: Rhino.InputStringParserSettings
[In] Determines what input will be parsed - output_unit_system
- Type: RhinoUnitSystem
[In] Output value is returned in this unit system - value_out
- Type: SystemDouble
[Out] The length value result - parse_results
- Type: Rhino.InputStringParserSettings
[Out] Describes the results of the parse operation - parsed_unit_system
- Type: RhinoUnitSystem
[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
Return Value
Type:
Int32
Returns the count of characters that were parsed or 0 if the operation was unsuccessful
See Also