StringExtensions (FSharp.Data)
Converts the string to a boolean. Fails if the value is not a valid boolean.
Converts the string to a boolean. Fails if the value is not a valid boolean.
-
x
:
String -
The string to convert. Accepts "true", "false", "yes", "no", "1", "0" (case-insensitive).
-
Returns:
bool
Converts the string to a DateTime. Fails if the value is not a valid date/time string.
Converts the string to a DateTime. Fails if the value is not a valid date/time string.
-
x
:
String -
The string to convert. Accepts ISO 8601 format or MSFT JSON date format.
-
?cultureInfo
:
CultureInfo -
Optional culture info for parsing. Defaults to InvariantCulture.
-
Returns:
DateTime
Converts the string to a DateTimeOffset. Fails if the value is not a valid date/time with offset string.
Converts the string to a DateTimeOffset. Fails if the value is not a valid date/time with offset string.
-
x
:
string -
The string to convert. Accepts ISO 8601 format with timezone offset or MSFT JSON date with offset.
-
?cultureInfo
:
CultureInfo -
Optional culture info for parsing. Defaults to InvariantCulture.
-
Returns:
DateTimeOffset
Converts the string to a decimal. Fails if the value is not a valid decimal.
Converts the string to a decimal. Fails if the value is not a valid decimal.
-
x
:
String -
The string to convert.
-
?cultureInfo
:
CultureInfo -
Optional culture info for parsing. Defaults to InvariantCulture.
-
Returns:
decimal
Converts the string to a float. Fails if the value is not a valid float.
Converts the string to a float. Fails if the value is not a valid float.
-
x
:
String -
The string to convert.
-
?cultureInfo
:
CultureInfo -
Optional culture info for parsing. Defaults to InvariantCulture.
-
?missingValues
:
string[] -
Values to treat as missing (NaN). Defaults to standard missing value strings.
-
Returns:
float
Converts the string to a Guid. Fails if the value is not a valid GUID string.
Converts the string to a Guid. Fails if the value is not a valid GUID string.
-
x
:
String -
The string to convert.
-
Returns:
Guid
Converts the string to an integer. Fails if the value is not a valid integer.
Converts the string to an integer. Fails if the value is not a valid integer.
-
x
:
String -
The string to convert.
-
?cultureInfo
:
CultureInfo -
Optional culture info for parsing. Defaults to InvariantCulture.
-
Returns:
int
Converts the string to a 64-bit integer. Fails if the value is not a valid 64-bit integer.
Converts the string to a 64-bit integer. Fails if the value is not a valid 64-bit integer.
-
x
:
String -
The string to convert.
-
?cultureInfo
:
CultureInfo -
Optional culture info for parsing. Defaults to InvariantCulture.
-
Returns:
int64
Converts the string to a TimeSpan. Fails if the value is not a valid time span string.
Converts the string to a TimeSpan. Fails if the value is not a valid time span string.
-
x
:
String -
The string to convert.
-
?cultureInfo
:
CultureInfo -
Optional culture info for parsing. Defaults to InvariantCulture.
-
Returns:
TimeSpan