영어 공부/기타

프로그래밍 영어 공부 - C# string (4/n) - 문자 그대로 표현하는 축자 string 리터럴

manwon 2019. 5. 25. 12:03
반응형

[알림] 본 페이지는 microsoft.com에 나온 C# 영문서를 본인이 우리말로 번역한 것입니다. 이해를 위해서 의역을 한 곳도 있습니다. 잘못된 해석은 댓글로 알려주시면 감사하겠습니다.

 

string C# Reference [원문 링크]
string C# 레퍼런스

 

14. The escape code \udddd (where dddd is a four-digit number) represents the Unicode character U+dddd. Eight-digit Unicode escape codes are also recognized: \Udddddddd.
이스케이프 코드 \udddd (여기서 dddd는 4자리 숫자)는 유니코드 문자 U+dddd를 뜻합니다. 8자리 숫자로 구성된 유니코드 이스케이프 코드들 또한 \udddddddd의 형태로 인식됩니다.

15. Verbatim string literals start with @ and are also enclosed in double quotation marks. For example:
(문자를 그대로를 표현해주는) 축어적 string 리터럴은 @로 시작한 후 역시 큰따옴표로 묶이게 된다. 예를 들어 보면:

@"good morning"    // a string literal 

16. The advantage of verbatim strings is that escape sequence are not processed, which makes it easy to write, for example, a fully qualified file name:
(문자 그대로를 표현해주는) 축어적 string들의 장점은 이스케이프 시퀀스가 처리되지 않기 때문에, 예를 들면 정규화된 파일 이름 같은 것들을 쉽게 쓸 수 있다는 것이다 :

@"c:\Docs\Source\a.txt"    // rather than "c:\\Docs\\Source\\a.txt"

17. To include a double quotation mark in an @-quoted string, double it:
@-quoted string (즉 축어적 string)에 큰따옴표를 포함시키고 싶으면, 큰따옴표를 두번 표기하라.

@"""Ahoy!"" cried the captin."    // "Ahoy" cried the captain.

 

to be continued...
다음 포스팅에 계속...

 

반응형