|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectorg.seasar.framework.util.StringUtil
String
用のユーティリティクラスです。
フィールドの概要 | |
static String[] |
EMPTY_STRINGS
空の文字列の配列です。 |
コンストラクタの概要 | |
protected |
StringUtil()
|
メソッドの概要 | |
static void |
appendHex(StringBuffer buf,
byte i)
文字列に、数値を16進数に変換した文字列を追加します。 |
static void |
appendHex(StringBuffer buf,
int i)
文字列に、数値を16進数に変換した文字列を追加します。 |
static String |
camelize(String s)
_記法をキャメル記法に変換します。 |
static String |
capitalize(String name)
JavaBeansの仕様にしたがってキャピタライズを行ないます。 |
static boolean |
contains(String str,
char ch)
charを含んでいるかどうか返します。 |
static boolean |
contains(String s1,
String s2)
文字列を含んでいるかどうか返します。 |
static String |
decamelize(String s)
キャメル記法を_記法に変換します。 |
static String |
decapitalize(String name)
JavaBeansの仕様にしたがってデキャピタライズを行ないます。 |
static boolean |
endsWithIgnoreCase(String target1,
String target2)
ケースインセンシティブで特定の文字で終わっているのかどうかを返します。 |
static boolean |
equals(String target1,
String target2)
文字列同士が等しいかどうか返します。 |
static boolean |
equalsIgnoreCase(String target1,
String target2)
ケースインセンシティブで文字列同士が等しいかどうか返します。 |
static boolean |
isBlank(String str)
ブランクかどうか返します。 |
static boolean |
isEmpty(String text)
空かどうかを返します。 |
static boolean |
isNotBlank(String str)
ブランクではないかどうか返します。 |
static boolean |
isNumber(String s)
文字列が数値のみで構成されているかどうかを返します。 |
static String |
ltrim(String text)
左側の空白を削ります。 |
static String |
ltrim(String text,
String trimText)
左側の指定した文字列を削ります。 |
static String |
replace(String text,
String fromText,
String toText)
文字列を置き換えます。 |
static String |
rtrim(String text)
右側の空白を削ります。 |
static String |
rtrim(String text,
String trimText)
右側の指定した文字列を削ります。 |
static String[] |
split(String str,
String delim)
文字列を分割します。 |
static boolean |
startsWith(String text,
String fragment)
推奨されていません。 |
static boolean |
startsWithIgnoreCase(String target1,
String target2)
ケースインセンシティブで特定の文字ではじまっているのかどうかを返します。 |
static String |
substringFromLast(String str,
String separator)
文字列の最後から指定した文字列で始まっている部分より手前を返します。 |
static String |
substringToLast(String str,
String separator)
文字列の最後から指定した文字列で始まっている部分より後ろを返します。 |
static String |
toHex(byte[] bytes)
16進数の文字列に変換します。 |
static String |
toHex(int i)
16進数の文字列に変換します。 |
static String |
trimPrefix(String text,
String prefix)
プレフィックスを削ります。 |
static String |
trimSuffix(String text,
String suffix)
サフィックスを削ります。 |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
public static final String[] EMPTY_STRINGS
コンストラクタの詳細 |
protected StringUtil()
メソッドの詳細 |
public static final boolean isEmpty(String text)
text
- 文字列
public static final String replace(String text, String fromText, String toText)
text
- テキストfromText
- 置き換え対象のテキストtoText
- 置き換えるテキスト
public static String[] split(String str, String delim)
str
- 文字列delim
- 分割するためのデリミタ
public static final String ltrim(String text)
text
- テキスト
public static final String ltrim(String text, String trimText)
text
- テキストtrimText
- 削るテキスト
public static final String rtrim(String text)
text
- テキスト
public static final String rtrim(String text, String trimText)
text
- テキストtrimText
- 削る文字列
public static final String trimSuffix(String text, String suffix)
text
- テキストsuffix
- サフィックス
public static final String trimPrefix(String text, String prefix)
text
- テキストprefix
- プレフィックス
public static String decapitalize(String name)
name
- 名前
public static String capitalize(String name)
name
- 名前
public static boolean startsWith(String text, String fragment)
text
- テキストfragment
- 特定の文字列
startsWithIgnoreCase(String, String)
public static boolean isBlank(String str)
str
- 文字列
public static boolean isNotBlank(String str)
str
- 文字列
isBlank(String)
public static boolean contains(String str, char ch)
str
- 文字列ch
- char
public static boolean contains(String s1, String s2)
s1
- 文字列s2
- 比較する対象となる文字列
public static boolean equals(String target1, String target2)
true
を返します。
target1
- 文字列1target2
- 文字列2
public static boolean equalsIgnoreCase(String target1, String target2)
true
を返します。
target1
- 文字列1target2
- 文字列2
public static boolean endsWithIgnoreCase(String target1, String target2)
target1
- テキストtarget2
- 比較する文字列
public static boolean startsWithIgnoreCase(String target1, String target2)
target1
- テキストtarget2
- 比較する文字列
public static String substringFromLast(String str, String separator)
str
- 文字列separator
- セパレータ
public static String substringToLast(String str, String separator)
str
- 文字列separator
- セパレータ
public static String toHex(byte[] bytes)
bytes
- バイトの配列
public static String toHex(int i)
i
- int
public static void appendHex(StringBuffer buf, byte i)
buf
- 追加先の文字列i
- 数値public static void appendHex(StringBuffer buf, int i)
buf
- 追加先の文字列i
- 数値public static String camelize(String s)
s
- テキスト
public static String decamelize(String s)
s
- テキスト
public static boolean isNumber(String s)
s
- 文字列
true
|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |