パッケージ nlp4j.util
クラス StringUtils
- java.lang.Object
-
- nlp4j.util.StringUtils
-
public class StringUtils extends Object
created_at 2021-07-24- 導入されたバージョン:
- 1.3.2.0
- 作成者:
- Hiroki Oya
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 StringUtils()
-
メソッドの概要
すべてのメソッド staticメソッド concreteメソッド 修飾子とタイプ メソッド 説明 static String
charAt(String s, int n)
static String
filter(String s, String encoding)
Remove characters that is not covered in encoding from String
文字エンコーディングに存在しない文字を除去します.static int
length(String s)
Return length of string in consideration of code point.
コードポイントを考慮した文字列長さを返します.static String
substring(String s, int startIndex, int endIndex)
created at: 2022-05-22static String[]
toChars(String s)
Return String Characters in consideration of code point.
コードポイントを考慮して1文字ずつの配列を返します.static int[]
toCodePointArray(String str)
Convert String to code point array.
文字列をコードポイントの配列に変換します.static String
toHexUnicode(char c)
Character to Unicode in Hex Stringstatic String
toHexUnicode(String s)
String to Unicode in Hex String
-
-
-
メソッドの詳細
-
filter
public static String filter(String s, String encoding)
Remove characters that is not covered in encoding from String
文字エンコーディングに存在しない文字を除去します.- パラメータ:
s
- 文字列encoding
- エンコーディング- 戻り値:
- フィルターされた文字
-
length
public static int length(String s)
Return length of string in consideration of code point.
コードポイントを考慮した文字列長さを返します.- パラメータ:
s
- 文字列- 戻り値:
- コードポイントを考慮した文字列長
-
substring
public static String substring(String s, int startIndex, int endIndex)
created at: 2022-05-22- パラメータ:
s
-startIndex
- index by codePointOffsetendIndex
- index by codePointOffset- 戻り値:
-
toChars
public static String[] toChars(String s)
Return String Characters in consideration of code point.
コードポイントを考慮して1文字ずつの配列を返します.- パラメータ:
s
- 文字列- 戻り値:
- コードポイントを考慮した文字配列
-
toCodePointArray
public static int[] toCodePointArray(String str)
Convert String to code point array.
文字列をコードポイントの配列に変換します.- パラメータ:
str
- 文字列- 戻り値:
- コードポイントの配列
-
toHexUnicode
public static String toHexUnicode(char c)
Character to Unicode in Hex String- パラメータ:
c
- to be converted- 戻り値:
- Unicode Hex String (Same as native2ascii)
- 導入されたバージョン:
- 1.3.2.0
-
-