public final class SWARUtil extends Object
Modifier and Type | Method and Description |
---|---|
static long |
applyPattern(long word,
long pattern)
Applies a compiled pattern to given word.
|
static long |
compilePattern(byte byteToFind)
Compiles given byte into a long pattern suitable for SWAR operations.
|
static boolean |
containsLowerCase(int word)
Returns true if the given word contains at least one ASCII lowercase byte.
|
static boolean |
containsLowerCase(long word)
Returns true if the given word contains at least one ASCII lowercase byte.
|
static boolean |
containsUpperCase(int word)
Returns true if the given word contains at least one ASCII uppercase byte.
|
static boolean |
containsUpperCase(long word)
Returns true if the given word contains at least one ASCII uppercase byte.
|
static int |
getIndex(long word,
boolean isBigEndian)
Returns the index of the first occurrence of byte that specificied in the pattern.
|
static int |
toLowerCase(int word)
Returns a word with all bytes converted to lowercase ASCII.
|
static long |
toLowerCase(long word)
Returns a word with all bytes converted to lowercase ASCII.
|
static int |
toUpperCase(int word)
Returns a word with all bytes converted to uppercase ASCII.
|
static long |
toUpperCase(long word)
Returns a word with all bytes converted to uppercase ASCII.
|
public static long compilePattern(byte byteToFind)
public static long applyPattern(long word, long pattern)
word
- the word to apply the pattern topattern
- the pattern to applypublic static int getIndex(long word, boolean isBigEndian)
word
- the return value of applyPattern(long, long)
isBigEndian
- if true, if given word is big endian
if false, if given word is little endianpublic static boolean containsUpperCase(long word)
public static boolean containsUpperCase(int word)
public static boolean containsLowerCase(long word)
public static boolean containsLowerCase(int word)
public static long toLowerCase(long word)
public static int toLowerCase(int word)
public static long toUpperCase(long word)
public static int toUpperCase(int word)
Copyright © 2008–2024 The Netty Project. All rights reserved.