C# Class eoschat.StringExtensions

string 拡張
ファイルを表示 Open project: okamototomoyuki/unity_eos_chat

Public Methods

Method Description
IsMatch ( string s, string regex ) : bool

正規表現にマッチしたか

IsNullOrEmpty ( string s ) : bool

空か?

NotEmpty ( string s ) : bool

空ではないか?

NullToEmp ( string s ) : string

Null なら空文字

ReplaceAll ( string s, string regex, string replace ) : string

正規表現で置換

ToByte ( string s, byte error ) : byte

int に変換

ToInt ( string s, int error = -1 ) : int

int に変換

ToLong ( string s, long error = -1 ) : long

long に変換

Method Details

IsMatch() public static method

正規表現にマッチしたか
public static IsMatch ( string s, string regex ) : bool
s string 文字列
regex string 正規表現
return bool

IsNullOrEmpty() public static method

空か?
public static IsNullOrEmpty ( string s ) : bool
s string 文字列
return bool

NotEmpty() public static method

空ではないか?
public static NotEmpty ( string s ) : bool
s string 文字列
return bool

NullToEmp() public static method

Null なら空文字
public static NullToEmp ( string s ) : string
s string 文字列
return string

ReplaceAll() public static method

正規表現で置換
public static ReplaceAll ( string s, string regex, string replace ) : string
s string 文字列
regex string 正規表現
replace string 置換文字列
return string

ToByte() public static method

int に変換
public static ToByte ( string s, byte error ) : byte
s string 文字列
error byte 変換失敗時の値
return byte

ToInt() public static method

int に変換
public static ToInt ( string s, int error = -1 ) : int
s string 文字列
error int 変換失敗時の値
return int

ToLong() public static method

long に変換
public static ToLong ( string s, long error = -1 ) : long
s string 文字列
error long 変換失敗時の値
return long