空白削除
全角でも半角でもスペースっぽいものは取り除く、タブ文字も追加 文字列中の空白も対象
static
string
deleteAllWhiteSpace
(string $s)
(余計だと思われる)エスケープシーケンスの削除
縦タブ、EOF文字、null文字を削除する。 特にnullインジェクションを回避するためにシステム外部の入力に対して必ず通す必要がある。
static
string
deleteEscapeSequence
(string $s)
改行削除
static
string
deleteNewLine
(string $s)
static
void
lowerCamel
( $s)
normalizeString
static
string
normalize
(string $s, [integer $mode = self::NORMALIZE_DEFAULT])
-
string
$s: 元の文字列
-
integer
$mode: 正規化モード
英数字を正規化する
すべての空白、タブ文字、全角空白を取り除く
static
strign
normalizeAlpha
(string $s)
英数字を正規化する
すべての空白、タブ文字、全角空白を取り除く
static
string
normalizeAlphaNumeric
(string $s)
数字項目を正規化する
すべての空白、タブ文字、全角空白を取り除く
static
string
normalizeDigit
(string $s)
数字項目を正規化する
すべての空白、タブ文字、全角空白を取り除く カンマを削除
static
string
normalizeNumeric
(string $s)
normalizeString
static
string
normalizeString
(string $s, integer $mode)
-
string
$s: 元の文字列
-
integer
$mode: 正規化モード
ランダム文字列生成(簡易)
適当にランダムな文字列を生成する。 ネタ元はhttp://tipstip.com/post/32/92/
static
string
randomString
([integer $length = 8])
特定文字列を繰り返した文字列を返す
static
string
repeat
(string $s, int $times)
-
string
$s: 繰り返したい文字列
-
int
$times: 回数
文字列の右側指定文字数分取得
static
string
right
(string $source, string $length)
-
string
$source: 元の文字列
-
string
$length: 長さ
キーと値の組み合わせを記述した文字列をキーと値に分割する
static
multitype:unknown
splitKeyValue
(unknown_type $str, [unknown_type $separator = "="])
-
unknown_type
$str
-
unknown_type
$separator
tab -> 空白の削除
static
string
tabToWhiteSpace
(string $s)
全角カナ、全角英数を半角に変換
static
string
toNarrow
(string $s)
入力オブジェクトを文字列化
static
string
toString
(object $o)
半角カナ、半角英数を全角に変換
static
string
toWide
(string $s)
trim()拡張
全角でも半角でもスペースっぽいものは取り除く、タブ文字も追加
static
string
trim
(string $s)
trim()拡張
全角でも半角でもスペースっぽいものは取り除く、タブ文字も追加
static
string
trimLeft
(string $s)
trim()拡張
全角でも半角でもスペースっぽいものは取り除く、タブ文字も追加
static
string
trimRight
(string $s)
static
void
upperCamel
( $s)