IKVM11
11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
ReadOnlySpanCharExtensions.cs
Go to the documentation of this file.
1
using
System
;
2
3
namespace
IKVM.Runtime.Extensions
4
{
5
9
static
class
ReadOnlySpanCharExtensions
10
{
11
17
public
static
int
GetHashCodeExtension
(
this
ReadOnlySpan<char> span)
18
{
19
#if NETFRAMEWORK
20
return
span.ToString().GetHashCode();
21
#else
22
return
string
.GetHashCode(span);
23
#endif
24
}
25
31
public
static
bool
OnlyNumbers
(
this
ReadOnlySpan<char> span)
32
{
33
foreach
(var c
in
span)
34
if
(
char
.IsNumber(c) ==
false
)
35
return
false
;
36
37
return
true
;
38
}
39
40
}
41
42
}
IKVM.Runtime.Extensions.ReadOnlySpanCharExtensions
Provides extension methods for working with ReadOnlySpan<Char>.
Definition
ReadOnlySpanCharExtensions.cs:10
IKVM.Runtime.Extensions.ReadOnlySpanCharExtensions.GetHashCodeExtension
static int GetHashCodeExtension(this ReadOnlySpan< char > span)
Returns a hashcode for this string.
Definition
ReadOnlySpanCharExtensions.cs:17
IKVM.Runtime.Extensions.ReadOnlySpanCharExtensions.OnlyNumbers
static bool OnlyNumbers(this ReadOnlySpan< char > span)
Returns true if every member is a number.
Definition
ReadOnlySpanCharExtensions.cs:31
IKVM.Runtime.Extensions
Definition
EnumerableExtensions.cs:2
System
Definition
HexConverter.cs:9
src
IKVM.Runtime
Extensions
ReadOnlySpanCharExtensions.cs
Generated by
1.12.0