티스토리 뷰

Delphi

function AnsiDequotedStr(const S: string; AQuote: Char): string;

C++

extern PACKAGE System::UnicodeString __fastcall AnsiDequotedStr(const System::UnicodeString S, System::WideChar AQuote)/* overload */;

Properties

Type

Visibility

Source

Unit

Parent

function

public

System.SysUtils.pas

System.SysUtils.hpp

System.SysUtils

System.SysUtils

Description

Converts a quoted string into an unquoted string.

AnsiDequotedStr removes the quotation marks from the beginning and end of a quoted strings and reduces pairs of quotation marks within the string to a single quotation mark.

The AQuote parameter defines what character to use as a quotation mark.

If the S parameter does not begin and end with the quotation mark, AnsiDequotedStr returns S unchanged.

Note: This function supports multi-byte character sets (MBCS).

 

인용된 문자열을 인용되지 않은 문자열로 변환합니다.

AnsiDequotedStr은 인용 부호로 묶인 문자열의 시작과 끝에서 인용 부호를 제거하고, 문자열 내의 인용 부호 쌍을 단일 인용 부호로 줄입니다.

AQuote 매개변수는 인용 부호로 사용할 문자를 정의합니다.

S 매개변수가 인용 부호로 시작하고 끝나지 않으면, AnsiDequotedStrS를 변경하지 않고 반환합니다.

참고: 이 함수는 멀티 바이트 문자 세트 (MBCS)를 지원합니다.

 

Example

var

  QuotedStr: string;

  DequotedStr: string;

  AQuote: Char;

begin

  QuotedStr := '"%문자열^%"';

  AQuote := '"';

  DequotedStr := AnsiDequotedStr(QuotedStr, AQuote);

 

  // 결과: %문자열^%

  Writeln(DequotedStr);

 

  AQuote := '%';

  DequotedStr := AnsiDequotedStr(DequotedStr, AQuote);

 

  // 결과: 문자열^

  Writeln(DequotedStr);

 

  AQuote := '^';

  DequotedStr := AnsiDequotedStr(DequotedStr, AQuote);

 

  // 결과: 문자열^

  Writeln(DequotedStr);

  Readln;

end.

 

quote ( unquote) (quote)

따옴표 열고 (… 따옴표 닫고) (말을 하면서 인용 내용을 나타낼 때 쓰는 표현)

reduce 미국식 [rɪ|du:s]   영국식 [rɪ|dju:s]   중요

1. (규모크기 등을) 줄이다; (가격 등을) 낮추다
2. (
음식 등을 끓일 때 국물을) 줄이다; (국물이) 줄어들다
3.
체중을 줄이다, 살을 빼다

 

출처: http://docwiki.embarcadero.com/Libraries/XE2/en/System.SysUtils.AnsiDequotedStr

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함