Uri.HexUnescape(String, Int32) 메서드

정의

지정된 문자의 16진수 표현을 문자로 변환합니다.

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진수 표현입니다.

index
Int32

문자의 16진수 표현이 시작되는 pattern의 위치입니다.

반환

Char

index 위치에 있으며 16진수로 인코딩된 문자입니다. index의 문자가 16진수로 인코딩되지 않은 경우 index의 문자가 반환됩니다. index의 값이 증분되어 반환된 문자 다음에 오는 문자를 가리킵니다.

예외

index가 0보다 작거나 pattern의 문자 수보다 크거나 같은 경우

설명

다음 코드 예제에서는 문자가 16진수로 인코딩되는지 여부를 확인하고, 인코딩된 경우 해당 문자를 콘솔에 씁니다.

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");
let testString = "%75"
let mutable index = 0
if Uri.IsHexEncoding(testString, index) then
    printfn $"The character is {Uri.HexUnescape(testString, &index)}"
else
    printfn "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

적용 대상