Class OTZStringUtils
Inheritance
System.Object
OTZStringUtils
アセンブリ: OTZControls.dll
Syntax
public class OTZStringUtils
コンストラクタ
OTZStringUtils()
宣言
フィールド
Cr
宣言
public const char Cr = '\r'
Field Value
FullWidthSpace
宣言
public const char FullWidthSpace = ' '
Field Value
HalfWidthSpace
宣言
public const char HalfWidthSpace = ' '
Field Value
Lf
宣言
public const char Lf = '\n'
Field Value
SeparatorList
宣言
public static List<char> SeparatorList
Field Value
SeparatorSet
宣言
public static HashSet<char> SeparatorSet
Field Value
型 |
説明 |
HashSet<System.Char> |
|
Tab
宣言
public const char Tab = '\t'
Field Value
メソッド
CharToHex(Char)
宣言
public static string CharToHex(char ch)
パラメーター
戻り値
ConvertFromCode(String)
宣言
public static string ConvertFromCode(string code)
パラメーター
型 |
名前 |
説明 |
System.String |
code |
|
戻り値
DefaultIfNull(String, String)
宣言
public static string DefaultIfNull(string value, string defalut)
パラメーター
型 |
名前 |
説明 |
System.String |
value |
|
System.String |
defalut |
|
戻り値
GetArrayText(String)
宣言
public static string[] GetArrayText(string text)
パラメーター
型 |
名前 |
説明 |
System.String |
text |
|
戻り値
GetCharCode(Encoding, String)
指定したエンコードに対する文字コードを取得します。
宣言
public static string GetCharCode(Encoding e, string s)
パラメーター
型 |
名前 |
説明 |
System.Text.Encoding |
e |
|
System.String |
s |
|
戻り値
GetLeftCharAddIndex(String, Int32)
指定されたインデックスから左に移動した時に必要なインデックスを取得します。
宣言
public static int GetLeftCharAddIndex(string s, int index)
パラメーター
型 |
名前 |
説明 |
System.String |
s |
|
System.Int32 |
index |
|
戻り値
GetLengthExceptNewLine(String)
宣言
public static int GetLengthExceptNewLine(string text)
パラメーター
型 |
名前 |
説明 |
System.String |
text |
|
戻り値
GetRightCharAddIndex(String, Int32)
指定されたインデックスから右に移動した時に必要なインデックスを取得します。
宣言
public static int GetRightCharAddIndex(string s, int index)
パラメーター
型 |
名前 |
説明 |
System.String |
s |
|
System.Int32 |
index |
|
戻り値
指定位置からカテゴリの範囲のインデックスを返します。
宣言
public static OTZMultiLineRange GetSelectionTextRange(string line, int index)
パラメーター
型 |
名前 |
説明 |
System.String |
line |
|
System.Int32 |
index |
|
戻り値
GetSepProc(Char)
宣言
public static SepProc GetSepProc(char ch)
パラメーター
戻り値
GetUnRegexPattern(String)
宣言
public static string GetUnRegexPattern(string text)
パラメーター
型 |
名前 |
説明 |
System.String |
text |
|
戻り値
IsAlphabetOrDigit(Char)
宣言
public static bool IsAlphabetOrDigit(char ch)
パラメーター
戻り値
IsAscii(Char)
宣言
public static bool IsAscii(char ch)
パラメーター
戻り値
IsClickableText(ReadOnlySpan<Char>, Int32, out Int32)
宣言
public static bool IsClickableText(ReadOnlySpan<char> text, int index, out int urlLength)
パラメーター
型 |
名前 |
説明 |
ReadOnlySpan<System.Char> |
text |
|
System.Int32 |
index |
|
System.Int32 |
urlLength |
|
戻り値
IsControlChars(String)
宣言
public static bool IsControlChars(string ch)
パラメーター
戻り値
IsCr(String, Int32)
宣言
public static bool IsCr(string s, int index)
パラメーター
型 |
名前 |
説明 |
System.String |
s |
文字列
|
System.Int32 |
index |
文字位置
|
戻り値
型 |
説明 |
System.Boolean |
CRである場合は true。それ以外の場合は false。
|
IsCrLf(String, Int32, Boolean)
宣言
public static bool IsCrLf(string s, int index, bool isRightToLeft)
パラメーター
型 |
名前 |
説明 |
System.String |
s |
文字列
|
System.Int32 |
index |
文字位置
|
System.Boolean |
isRightToLeft |
検索が左から右ではなく右から左に行われるように指定します。
|
戻り値
型 |
説明 |
System.Boolean |
CRLFである場合は true。それ以外の場合は false。
|
IsDouble(Char)
宣言
public static bool IsDouble(char ch)
パラメーター
戻り値
IsEmpty(String, String)
宣言
public static string IsEmpty(string value, string defaultValue)
パラメーター
型 |
名前 |
説明 |
System.String |
value |
|
System.String |
defaultValue |
|
戻り値
IsEscapeString(String, Int32, Char)
指定したインデックスの文字がエスケープされているかを確認します。
宣言
public static bool IsEscapeString(string line, int index, char escape)
パラメーター
型 |
名前 |
説明 |
System.String |
line |
対象文字列
|
System.Int32 |
index |
対象文字のインデックス
|
System.Char |
escape |
エスケープ文字
|
戻り値
IsFullWidthKatakana(Char)
宣言
public static bool IsFullWidthKatakana(char ch)
パラメーター
戻り値
IsHalfWidthKatakana(Char)
宣言
public static bool IsHalfWidthKatakana(char ch)
パラメーター
戻り値
IsHighSurrogate(Char)
宣言
public static bool IsHighSurrogate(char ch)
パラメーター
戻り値
IsHiragana(Char)
宣言
public static bool IsHiragana(char ch)
パラメーター
戻り値
IsKanji(Char)
宣言
public static bool IsKanji(char ch)
パラメーター
戻り値
IsLastCharCr(String)
文字列が改行文字(CR)で終わっているかどうか判断します。
宣言
public static bool IsLastCharCr(string value)
パラメーター
型 |
名前 |
説明 |
System.String |
value |
|
戻り値
IsLastCharNewLine(String)
文字列が改行文字(CRLF、CR、LF)で終わっているかどうか判断します。
宣言
public static bool IsLastCharNewLine(string value)
パラメーター
型 |
名前 |
説明 |
System.String |
value |
|
戻り値
IsLeftCharSurrogatePair(String, Int32)
指定されたインデックスの左文字がサロゲートペア文字かどうかを判断します。
宣言
public static bool IsLeftCharSurrogatePair(string s, int index)
パラメーター
型 |
名前 |
説明 |
System.String |
s |
|
System.Int32 |
index |
|
戻り値
IsLf(String, Int32)
文字列の指定した場所が 改行文字(LF) か判断します。
宣言
public static bool IsLf(string s, int index)
パラメーター
型 |
名前 |
説明 |
System.String |
s |
文字列
|
System.Int32 |
index |
文字位置
|
戻り値
型 |
説明 |
System.Boolean |
LFである場合は true。それ以外の場合は false。
|
IsLowSurrogate(Char)
宣言
public static bool IsLowSurrogate(char ch)
パラメーター
戻り値
IsMailAddress(ReadOnlySpan<Char>, Int32, out Int32, out Int32)
宣言
public static bool IsMailAddress(ReadOnlySpan<char> text, int index, out int start, out int end)
パラメーター
型 |
名前 |
説明 |
ReadOnlySpan<System.Char> |
text |
|
System.Int32 |
index |
|
System.Int32 |
start |
|
System.Int32 |
end |
|
戻り値
IsMailAddressChar(Char)
メールアドレスとして有効な文字かどうかを判断します。
宣言
public static bool IsMailAddressChar(char ch)
パラメーター
戻り値
IsNewLine(Char)
宣言
public static bool IsNewLine(char ch)
パラメーター
戻り値
IsNewLine(String)
宣言
public static bool IsNewLine(string value)
パラメーター
型 |
名前 |
説明 |
System.String |
value |
|
戻り値
IsNewLine(String, Int32)
指定されたインデックスの文字が改行文字かどうかを返します。
宣言
public static bool IsNewLine(string value, int index)
パラメーター
型 |
名前 |
説明 |
System.String |
value |
|
System.Int32 |
index |
|
戻り値
IsRightCharSurrogatePair(ReadOnlySpan<Char>, Int32)
文字列の指定された位置の右文字がサロゲートペア文字かどうかを判断します。
宣言
public static bool IsRightCharSurrogatePair(ReadOnlySpan<char> s, int index)
パラメーター
型 |
名前 |
説明 |
ReadOnlySpan<System.Char> |
s |
|
System.Int32 |
index |
|
戻り値
IsSearchNewLine(String)
宣言
public static bool IsSearchNewLine(string text)
パラメーター
型 |
名前 |
説明 |
System.String |
text |
|
戻り値
IsSeparator(Char)
宣言
public static bool IsSeparator(char ch)
パラメーター
戻り値
IsSurrogatePair(String, Int32)
宣言
public static bool IsSurrogatePair(string s, int index)
パラメーター
型 |
名前 |
説明 |
System.String |
s |
|
System.Int32 |
index |
|
戻り値
IsUnicode(String)
Unicode 固有文字が存在するかをチェックして、その結果を返す。
(Win32API 版)
宣言
public static bool IsUnicode(string checkString)
パラメーター
型 |
名前 |
説明 |
System.String |
checkString |
チェック対象の文字列
|
戻り値
型 |
説明 |
System.Boolean |
Unicode固有文字が含まれているとき true、含まれないとき false を返す。
|
IsUnicode2(String)
Unicode 固有文字が存在するかをチェックして、その結果を返す。
(マネージドコード版)
宣言
public static bool IsUnicode2(string checkString)
パラメーター
型 |
名前 |
説明 |
System.String |
checkString |
チェック対象の文字列
|
戻り値
型 |
説明 |
System.Boolean |
Unicode固有文字が含まれているとき true、含まれないとき false を返す。
|
IsUnknown(Char)
英字と数字と平仮名と漢字と半角カナと全角カナと改行以外
宣言
public static bool IsUnknown(char ch)
パラメーター
戻り値
LengthExceptNewLine(String)
宣言
public static int LengthExceptNewLine(string s)
パラメーター
戻り値
StringToHex(String)
宣言
public static string StringToHex(String text)
パラメーター
戻り値
Test()
宣言
public static void Test()
ToNewLineArray(String)
文字列を改行コードで区切り改行コード付きのリストにして返します。
宣言
public static List<String> ToNewLineArray(string text)
パラメーター
型 |
名前 |
説明 |
System.String |
text |
対象の文字列。
|
戻り値
型 |
説明 |
List<String> |
改行コードで区切られたリスト
|