Uri.HexUnescape(String, Int32) Uri.HexUnescape(String, Int32) Uri.HexUnescape(String, Int32) Uri.HexUnescape(String, Int32) Method

定義

指定した 16 進数文字表現を文字に変換します。Converts a specified hexadecimal representation of a character to the character.

public:
 static char HexUnescape(System::String ^ pattern, int % index);
public static char HexUnescape (string pattern, ref int index);
static member HexUnescape : string *  -> char
Public Shared Function HexUnescape (pattern As String, ByRef index As Integer) As Char

パラメーター

pattern
String String String String

文字の 16 進数表現。The hexadecimal representation of a character.

index
Int32 Int32 Int32 Int32

pattern での文字の 16 進数表現の開始位置。The location in pattern where the hexadecimal representation of a character begins.

戻り値

index の位置の 16 進数エンコーディングが表現する文字。The character represented by the hexadecimal encoding at position index. index の位置の文字が 16 進数エンコーディングでない場合は、index の位置の文字が返されます。If the character at index is not hexadecimal encoded, the character at index is returned. index の値が増加し、返された文字の次の文字を指します。The value of index is incremented to point to the character following the one returned.

例外

index が 0 未満か pattern に含まれている文字数以上の値です。index is less than 0 or greater than or equal to the number of characters in pattern.

注釈

次のコード例では、16 進形式でエンコードされ、そうである場合は、同等の文字をコンソールに出力された文字があるかどうかを決定します。The following code example determines whether a character is hexadecimal encoded and, if so, writes the equivalent character to the console.

String^ testString = "%75";
int index = 0;
if ( Uri::IsHexEncoding( testString, index ) )
{
   Console::WriteLine( "The character is {0}",
      Uri::HexUnescape( testString, index ) );
}
else
{
   Console::WriteLine( "The character is not hex encoded" );
}
string testString = "%75";
int index = 0;
if (Uri.IsHexEncoding(testString, index))
     Console.WriteLine("The character is {0}", Uri.HexUnescape(testString, ref index));
else
     Console.WriteLine("The character is not hexadecimal encoded");
Dim testString As String = "%75"
Dim index As Integer = 0
If Uri.IsHexEncoding(testString, index) Then
    Console.WriteLine("The character is {0}", Uri.HexUnescape(testString, index))
Else
    Console.WriteLine("The character is not hexadecimal encoded")
End If

適用対象