-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathString.To.Int64Local.cs
44 lines (36 loc) · 1.21 KB
/
String.To.Int64Local.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
namespace Ace.CSharp.Extensions;
public static partial class StringExtensions
{
public static long ToInt64Local(this string? @this)
{
return ToInt64(@this, CultureInfo.CurrentCulture);
}
public static long ToInt64OrDefaultLocal(this string? @this, long @default = default)
{
return ToInt64OrDefault(@this, CultureInfo.CurrentCulture, @default);
}
public static long? ToInt64OrNullLocal(this string? @this)
{
return ToInt64OrNull(@this, CultureInfo.CurrentCulture);
}
public static bool TryConvertToInt64Local(this string? @this, out long result)
{
return TryConvertToInt64(@this, CultureInfo.CurrentCulture, out result);
}
public static long ToLongLocal(this string? @this)
{
return ToInt64Local(@this);
}
public static long ToLongOrDefaultLocal(this string? @this, long @default = default)
{
return ToInt64OrDefaultLocal(@this, @default);
}
public static long? ToLongOrNullLocal(this string? @this)
{
return ToInt64OrNullLocal(@this);
}
public static bool TryConvertToLongLocal(this string? @this, out long result)
{
return TryConvertToInt64Local(@this, out result);
}
}