Converts value into long or returns 0 when conversion is not possible.
the value to convert.
long value or 0 when conversion is not supported.
Converts value into integer or returns default when conversion is not possible.
the value to convert.
the default value.
long value or default when conversion is not supported
Converts value into long or returns null when conversion is not possible.
the value to convert.
long value or null when conversion is not supported.
Generated using TypeDoc
Converts arbitrary values into longs using extended conversion rules:
Example
let value1 = LongConverter.toNullableLong("ABC"); // Result: null let value2 = LongConverter.toNullableLong("123.456"); // Result: 123 let value3 = LongConverter.toNullableLong(true); // Result: 1 let value4 = LongConverter.toNullableLong(new Date()); // Result: current milliseconds