Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
ParseExtensions Class Reference

Static Public Member Functions

static T[] ArrayMinSize< T > (int minSize, T[] array)
 Ensure the array has at least minSize elements. More...
 
static string[] ParseArray (string text, params char[] separators)
 Returns a string array of the values separated by the optional separators More...
 
static string[] ParseArray (string text, StringSplitOptions options, params char[] separators)
 Returns returns a string array of the values separated by a comma in a string More...
 
static bool TryParseBoolArray (string text, out bool[]flags)
 Parse a string to an array of boolean flags More...
 
static bool TryParseColor (string text, out Color result)
 
static bool TryParseColor32 (string text, out Color32 result)
 
static bool TryParseEnumIntArray< T > (string text, out T[]flags)
 Parse a string to an array of enum flags represented as ints More...
 
static bool TryParseQuaternion (string text, out Quaternion result)
 
static bool TryParseQuaternionD (string text, out QuaternionD result)
 
static bool TryParseRect (string text, out Rect result)
 
static bool TryParseVector2 (string text, out Vector2 result)
 Returns true if the string can be parsed into a Vector2 and stores the result into the out More...
 
static bool TryParseVector2d (string text, out Vector2d result)
 Returns true if the string can be parsed into a Vector2d and stores the result into the out More...
 
static bool TryParseVector3 (string text, out Vector3 result)
 Returns true if the string can be parsed into a Vector3 and stores the result into the out More...
 
static bool TryParseVector3d (string text, out Vector3d result)
 Returns true if the string can be parsed into a Vector3d and stores the result into the out More...
 
static bool TryParseVector4 (string text, out Vector4 result)
 Returns true if the string can be parsed into a Vector4 and stores the result into the out More...
 
static bool TryParseVector4d (string text, out Vector4d result)
 Returns true if the string can be parsed into a Vector4d and stores the result into the out More...
 

Member Function Documentation

static T [] ParseExtensions.ArrayMinSize< T > ( int  minSize,
T[]  array 
)
inlinestatic

Ensure the array has at least minSize elements.

Returns null if array is null, array if array.Length >= minsize, otherwise a new array with elements copied from array.

static string [] ParseExtensions.ParseArray ( string  text,
params char[]  separators 
)
inlinestatic

Returns a string array of the values separated by the optional separators

Parameters
textString to parse
separatorsdefaults to only ,
Returns
static string [] ParseExtensions.ParseArray ( string  text,
StringSplitOptions  options,
params char[]  separators 
)
inlinestatic

Returns returns a string array of the values separated by a comma in a string

Parameters
textString to parse
splitOptionsDefaults to remove empty
separatorsdefaults to only ,
Returns
static bool ParseExtensions.TryParseBoolArray ( string  text,
out bool[]  flags 
)
inlinestatic

Parse a string to an array of boolean flags

static bool ParseExtensions.TryParseColor ( string  text,
out Color  result 
)
inlinestatic
static bool ParseExtensions.TryParseColor32 ( string  text,
out Color32  result 
)
inlinestatic
static bool ParseExtensions.TryParseEnumIntArray< T > ( string  text,
out T[]  flags 
)
inlinestatic

Parse a string to an array of enum flags represented as ints

static bool ParseExtensions.TryParseQuaternion ( string  text,
out Quaternion  result 
)
inlinestatic
static bool ParseExtensions.TryParseQuaternionD ( string  text,
out QuaternionD  result 
)
inlinestatic
static bool ParseExtensions.TryParseRect ( string  text,
out Rect  result 
)
inlinestatic
static bool ParseExtensions.TryParseVector2 ( string  text,
out Vector2  result 
)
inlinestatic

Returns true if the string can be parsed into a Vector2 and stores the result into the out

Parameters
textString to parse
resultValue to store the result in
static bool ParseExtensions.TryParseVector2d ( string  text,
out Vector2d  result 
)
inlinestatic

Returns true if the string can be parsed into a Vector2d and stores the result into the out

Parameters
textString to parse
resultValue to store the result in
static bool ParseExtensions.TryParseVector3 ( string  text,
out Vector3  result 
)
inlinestatic

Returns true if the string can be parsed into a Vector3 and stores the result into the out

Parameters
textString to parse
resultValue to store the result in
static bool ParseExtensions.TryParseVector3d ( string  text,
out Vector3d  result 
)
inlinestatic

Returns true if the string can be parsed into a Vector3d and stores the result into the out

Parameters
textString to parse
resultValue to store the result in
static bool ParseExtensions.TryParseVector4 ( string  text,
out Vector4  result 
)
inlinestatic

Returns true if the string can be parsed into a Vector4 and stores the result into the out

Parameters
textString to parse
resultValue to store the result in
static bool ParseExtensions.TryParseVector4d ( string  text,
out Vector4d  result 
)
inlinestatic

Returns true if the string can be parsed into a Vector4d and stores the result into the out

Parameters
textString to parse
resultValue to store the result in

The documentation for this class was generated from the following file: