Search Results for

    Show / Hide Table of Contents

    Class OTZStringUtils

    文字列関連の機能を提供します。

    Inheritance
    System.Object
    OTZStringUtils
    名前空間: OTZControls.Utilities
    アセンブリ: OTZControls.dll
    Syntax
    public class OTZStringUtils

    コンストラクタ

    OTZStringUtils()

    コンストラクタ

    宣言
    public OTZStringUtils()

    フィールド

    Cr

    キャリッジリターンを表す。

    宣言
    public const char Cr = '\r'
    Field Value
    型 説明
    System.Char

    FullWidthSpace

    全角スペースを表す。

    宣言
    public const char FullWidthSpace = ' '
    Field Value
    型 説明
    System.Char

    HalfWidthSpace

    半角スペースを表す。

    宣言
    public const char HalfWidthSpace = ' '
    Field Value
    型 説明
    System.Char

    Lf

    ラインフィードを表す。

    宣言
    public const char Lf = '\n'
    Field Value
    型 説明
    System.Char

    SeparatorList

    宣言
    public static List<char> SeparatorList
    Field Value
    型 説明
    List<System.Char>

    SeparatorSet

    宣言
    public static HashSet<char> SeparatorSet
    Field Value
    型 説明
    HashSet<System.Char>

    Tab

    タブ文字を表す。

    宣言
    public const char Tab = '\t'
    Field Value
    型 説明
    System.Char

    メソッド

    CharToHex(Char)

    文字(Char)を16進に変換します。

    宣言
    public static string CharToHex(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.String

    ConvertFromCode(String)

    宣言
    public static string ConvertFromCode(string code)
    パラメーター
    型 名前 説明
    System.String code
    戻り値
    型 説明
    System.String

    DefaultIfNull(String, String)

    宣言
    public static string DefaultIfNull(string value, string defalut)
    パラメーター
    型 名前 説明
    System.String value
    System.String defalut
    戻り値
    型 説明
    System.String

    GetArrayText(String)

    宣言
    public static string[] GetArrayText(string text)
    パラメーター
    型 名前 説明
    System.String text
    戻り値
    型 説明
    System.String[]

    GetCharCode(Encoding, String)

    指定したエンコードに対する文字コードを取得します。

    宣言
    public static string GetCharCode(Encoding e, string s)
    パラメーター
    型 名前 説明
    System.Text.Encoding e
    System.String s
    戻り値
    型 説明
    System.String

    GetLeftCharAddIndex(String, Int32)

    指定されたインデックスから左に移動した時に必要なインデックスを取得します。

    宣言
    public static int GetLeftCharAddIndex(string s, int index)
    パラメーター
    型 名前 説明
    System.String s
    System.Int32 index
    戻り値
    型 説明
    System.Int32

    GetLengthExceptNewLine(String)

    改行コードを除いた文字列の長さを取得します。

    宣言
    public static int GetLengthExceptNewLine(string text)
    パラメーター
    型 名前 説明
    System.String text
    戻り値
    型 説明
    System.Int32

    GetRightCharAddIndex(String, Int32)

    指定されたインデックスから右に移動した時に必要なインデックスを取得します。

    宣言
    public static int GetRightCharAddIndex(string s, int index)
    パラメーター
    型 名前 説明
    System.String s
    System.Int32 index
    戻り値
    型 説明
    System.Int32

    GetSelectionTextRange(String, Int32)

    指定位置からカテゴリの範囲のインデックスを返します。

    宣言
    public static OTZMultiLineRange GetSelectionTextRange(string line, int index)
    パラメーター
    型 名前 説明
    System.String line
    System.Int32 index
    戻り値
    型 説明
    OTZMultiLineRange

    GetSepProc(Char)

    区切り文字のメソッドを取得します。

    宣言
    public static SepProc GetSepProc(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    SepProc

    GetUnRegexPattern(String)

    正規表現の検索パターンを無効にします。

    宣言
    public static string GetUnRegexPattern(string text)
    パラメーター
    型 名前 説明
    System.String text
    戻り値
    型 説明
    System.String

    IsAlphabetOrDigit(Char)

    h半角英数字かどうかを示します。

    宣言
    public static bool IsAlphabetOrDigit(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    IsAscii(Char)

    ASCII 文字かどうかを示します。

    宣言
    public static bool IsAscii(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    IsClickableText(ReadOnlySpan<Char>, Int32, out Int32)

    URL かどうかを示します。

    宣言
    public static bool IsClickableText(ReadOnlySpan<char> text, int index, out int urlLength)
    パラメーター
    型 名前 説明
    ReadOnlySpan<System.Char> text
    System.Int32 index
    System.Int32 urlLength
    戻り値
    型 説明
    System.Boolean

    IsControlChars(String)

    制御文字かどうかを返します。

    宣言
    public static bool IsControlChars(string ch)
    パラメーター
    型 名前 説明
    System.String ch
    戻り値
    型 説明
    System.Boolean

    IsCr(String, Int32)

    文字列の指定した場所が CR か判断します。

    宣言
    public static bool IsCr(string s, int index)
    パラメーター
    型 名前 説明
    System.String s

    文字列

    System.Int32 index

    文字位置

    戻り値
    型 説明
    System.Boolean

    CRである場合は true。それ以外の場合は false。

    IsCrLf(String, Int32, Boolean)

    CRLFか判断します。

    宣言
    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)

    とりあえず2バイト文字

    宣言
    public static bool IsDouble(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    IsEmpty(String, String)

    宣言
    public static string IsEmpty(string value, string defaultValue)
    パラメーター
    型 名前 説明
    System.String value
    System.String defaultValue
    戻り値
    型 説明
    System.String

    IsEscapeString(String, Int32, Char)

    指定したインデックスの文字がエスケープされているかを確認します。

    宣言
    public static bool IsEscapeString(string line, int index, char escape)
    パラメーター
    型 名前 説明
    System.String line

    対象文字列

    System.Int32 index

    対象文字のインデックス

    System.Char escape

    エスケープ文字

    戻り値
    型 説明
    System.Boolean

    IsFullWidthKatakana(Char)

    全角カタカナかどうかを取得します。

    宣言
    public static bool IsFullWidthKatakana(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    IsHalfWidthKatakana(Char)

    半角カナおよび半角カナ句読点かどうかを示します。

    宣言
    public static bool IsHalfWidthKatakana(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    IsHighSurrogate(Char)

    上位サロゲートペアかどうかを返します。

    宣言
    public static bool IsHighSurrogate(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    IsHiragana(Char)

    全角平仮名かどうかを示します。

    宣言
    public static bool IsHiragana(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    IsKanji(Char)

    全角漢字かどうかを取得します。

    宣言
    public static bool IsKanji(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    IsLastCharCr(String)

    文字列が改行文字(CR)で終わっているかどうか判断します。

    宣言
    public static bool IsLastCharCr(string value)
    パラメーター
    型 名前 説明
    System.String value
    戻り値
    型 説明
    System.Boolean

    IsLastCharNewLine(String)

    文字列が改行文字(CRLF、CR、LF)で終わっているかどうか判断します。

    宣言
    public static bool IsLastCharNewLine(string value)
    パラメーター
    型 名前 説明
    System.String value
    戻り値
    型 説明
    System.Boolean

    IsLeftCharSurrogatePair(String, Int32)

    指定されたインデックスの左文字がサロゲートペア文字かどうかを判断します。

    宣言
    public static bool IsLeftCharSurrogatePair(string s, int index)
    パラメーター
    型 名前 説明
    System.String s
    System.Int32 index
    戻り値
    型 説明
    System.Boolean

    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)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    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
    戻り値
    型 説明
    System.Boolean

    IsMailAddressChar(Char)

    メールアドレスとして有効な文字かどうかを判断します。

    宣言
    public static bool IsMailAddressChar(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    IsNewLine(Char)

    改行かどうかを判断します。

    宣言
    public static bool IsNewLine(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    IsNewLine(String)

    宣言
    public static bool IsNewLine(string value)
    パラメーター
    型 名前 説明
    System.String value
    戻り値
    型 説明
    System.Boolean

    IsNewLine(String, Int32)

    指定されたインデックスの文字が改行文字かどうかを返します。

    宣言
    public static bool IsNewLine(string value, int index)
    パラメーター
    型 名前 説明
    System.String value
    System.Int32 index
    戻り値
    型 説明
    System.Boolean

    IsRightCharSurrogatePair(ReadOnlySpan<Char>, Int32)

    文字列の指定された位置の右文字がサロゲートペア文字かどうかを判断します。

    宣言
    public static bool IsRightCharSurrogatePair(ReadOnlySpan<char> s, int index)
    パラメーター
    型 名前 説明
    ReadOnlySpan<System.Char> s
    System.Int32 index
    戻り値
    型 説明
    System.Boolean

    IsSearchNewLine(String)

    宣言
    public static bool IsSearchNewLine(string text)
    パラメーター
    型 名前 説明
    System.String text
    戻り値
    型 説明
    System.Boolean

    IsSeparator(Char)

    区切文字かどうかを示します。

    宣言
    public static bool IsSeparator(char ch)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    IsSurrogatePair(String, Int32)

    宣言
    public static bool IsSurrogatePair(string s, int index)
    パラメーター
    型 名前 説明
    System.String s
    System.Int32 index
    戻り値
    型 説明
    System.Boolean

    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)
    パラメーター
    型 名前 説明
    System.Char ch
    戻り値
    型 説明
    System.Boolean

    LengthExceptNewLine(String)

    宣言
    public static int LengthExceptNewLine(string s)
    パラメーター
    型 名前 説明
    System.String s
    戻り値
    型 説明
    System.Int32

    StringToHex(String)

    文字列を16進に変換します。

    宣言
    public static string StringToHex(String text)
    パラメーター
    型 名前 説明
    String text
    戻り値
    型 説明
    System.String

    Test()

    テスト用のメソッドです。

    宣言
    public static void Test()

    ToNewLineArray(String)

    文字列を改行コードで区切り改行コード付きのリストにして返します。

    宣言
    public static List<String> ToNewLineArray(string text)
    パラメーター
    型 名前 説明
    System.String text

    対象の文字列。

    戻り値
    型 説明
    List<String>

    改行コードで区切られたリスト

    In This Article
    Back to top Generated by DocFX