Uri.HexUnescape(String, Int32) 메서드

정의

지정된 문자의 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 * int -> char
Public Shared Function HexUnescape (pattern As String, ByRef index As Integer) As Char

매개 변수

pattern
String

문자의 16진수 표현입니다.The hexadecimal representation of a character.

index
Int32

문자의 16진수 표현이 시작되는 pattern의 위치입니다.The location in pattern where the hexadecimal representation of a character begins.

반환

Char

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.

설명

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

적용 대상