Strutils를 사용합니다; [문자열 함수의 초록]
첫 번째 함수 ansiresemblestext (const atext, aother : string) : 부울;
$ [strutils.pas
함수는 두 문자열이 비슷한 지 여부를 반환합니다
설명 ANSI (American National Standards Institute) American National Standards Institute;
참조 함수 strutils.soundexproc;
예제 CheckBox1.Checked : = ansiresemBlestext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansicontainstext (const atext, asubtext : string) : boolean;
$ [strutils.pas
함수는 문자열 atext에 서브 스트링 asubtext를 포함하는지 여부를 반환합니다.
사례 둔감을 나타냅니다
참조 기능 strutils.ansiuppercase;
예제 CheckBox1.Checked : = ansicontainstext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansistartStext (const asubtext, atext : string) : boolean;
$ [strutils.pas
함수는 문자열 atext가 서브 스트링 asubtext로 시작하는지 여부를 반환합니다.
사례 둔감을 나타냅니다
참조 기능 Windows.comparestring
예제 CheckBox1.Checked : = ansistArtStext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansiendstext (const asubtext, atext : string) : boolean;
$ [strutils.pas
함수는 문자열 atext가 서브 스트링 asubtext로 끝나는 지 여부를 반환합니다.
사례 둔감을 나타냅니다
참조 기능 Windows.comparestring
예제 CheckBox1.Checked : = ansiendStext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansireplacetext (const atext, afromtext, atotext : string) :
문자열; $ [strutils.pas
함수는 문자열 Atext에서 substring atotext로 substring afromtext를 대체 한 결과를 반환합니다.
사례 둔감을 나타냅니다
참조 기능 sysutils.stringreplace;
예제 edit4.text : = ansireplacetext (edit1.text, edit2.text, edit3.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansimatchtext (const atext : string; const avalues : 배열
문자열) : 부울; $ [strutils.pas
함수는 문자열 Avalues에 문자열 atext가 포함되어 있는지 여부를 반환합니다.
사례 둔감을 나타냅니다
참조 함수 strutils.ansiindexText
예제 CheckBox1.Checked : = ansimatchText (edit1.text, [ 'a1', 'a2', 'a3',
'a4']);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansiindexText (const atext : string; const avalues : 배열
문자열) : 정수; $ [strutils.pas
함수는 문자열 배열에서 문자열 atext의 위치를 반환합니다.
포함되지 않으면 -1
참조 함수 sysutils.ansisametext
예제 spinedit1.value : = ansiindexText (edit1.text, [ 'a1', 'a2', 'a3', 'a4']);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansicontainsstr (const atext, asubtext : string) : boolean;
$ [strutils.pas
함수는 문자열 atext에 서브 스트링 asubtext를 포함하는지 여부를 반환합니다.
설명 사례에 민감합니다
참조 기능 strutils.ansipos
예제 Checkbox1.Checked : = ansicontainsstr (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansistartsstr (const asubtext, atext : string) : 부울;
$ [strutils.pas
함수는 문자열 atext가 서브 스트링 asubtext로 시작하는지 여부를 반환합니다.
설명 사례에 민감합니다
참조 함수 sysutils.ansisamest
예제 CheckBox1.Checked : = ansistartsstr (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansiendsstr (const asubtext, atext : string) : 부울;
$ [strutils.pas
함수는 문자열 atext가 서브 스트링 asubtext로 끝나는 지 여부를 반환합니다.
설명 사례에 민감합니다
참조 함수 sysutils.ansisamest
예제 CheckBox1.Checked : = ansiendsstr (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansireplacest (const atext, afromtext, atotext : String) :
문자열; $ [strutils.pas
함수는 문자열 Atext에서 substring atotext로 substring afromtext를 대체 한 결과를 반환합니다.
설명 사례에 민감합니다
참조 기능 sysutils.stringreplace;
예제 edit4.text : = ansireplacest (edit1.text, edit2.text, edit3.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansimatchstr (const atext : string; const Avalues : 배열
문자열) : 부울; $ [strutils.pas
함수는 문자열 Avalues에 문자열 atext가 포함되어 있는지 여부를 반환합니다.
설명 사례에 민감합니다
참조 기능 strutil.ansiindexstr
예제 CheckBox1.Checked : = ansimatchstr (edit1.text, [ 'a1', 'a2', 'a3',
'a4']);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansiindexstr (const atext : string; const avalues : 배열
문자열) : 정수; $ [strutils.pas
함수는 문자열 배열에서 문자열 atext의 위치를 반환합니다.
설명 사례에 민감합니다
참조 함수 sysutils.ansisamest
spinedit1.value 예제 : = ansiindexstr (edit1.text, [ 'a1', 'a2', 'a3', 'a4']);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 dupestring (const atext : string; acount : Integer) : String;
$ [strutils.pas
함수는 문자열 Atext의 Acount Replicas를 반환합니다
설명이 0 인 경우 reture ''
함수 System.setLength를 참조하십시오
예제 edit3.text : = dupestring (edit1.text, spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 반전 (const atext : String) : String [Strutils.pas
함수는 문자열 Atext의 역 순서를 반환합니다
설명 반전 ( '1234') = '4321'
함수 System.setLength를 참조하십시오
예제 edit3.text : = Reversestring (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 wittsString (const atext : String; astart, alength : cardinal;
const asubtext : String) : String [Strutils.pas
함수 중첩 문자열을 반환합니다
설명 ASTART : 둥지 시작 위치;
기능 System.copy를 참조하십시오
예제 edit3.text : = stuffstring (edit1.text, spinedit1.value, spinedit2.value,
edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 randomfrom (const avalues : 배열) : String;
$ [strutils.pas
함수 문자열 배열에서 요소를 무작위로 반환합니다.
이전에 무작위 화를 실행하는 것이 좋습니다
참조 기능 시스템
예제 randomize;
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 ifthen (avalue : boolean; const atrue : string; afalse : String =
') : 문자열; 과부하;
함수 지정된 논리 문자열을 반환합니다
ifthen (true, 'yes', 'no') = '예'; ifthen (false, 'yes', 'no') = 'no'
참조 <null>
예제 edit3.text : = ifthen (checkbox1.checked, edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 함수 leftstr (const atext : 문자열; const acount : Integer) : 문자열;
$ [strutils.pas
함수 문자열 atext의 왼쪽에있는 Acount 문자를 반환합니다.
설명 leftstr ( '123456', 3) = '123'
기능 System.copy를 참조하십시오
예제 edit3.text : = leftstr (edit1.text, spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 rightstr (const atext : String; const acount : Integer) : String;
$ [strutils.pas
함수 문자열의 오른쪽에있는 Acount 문자를 반환합니다.
설명 rightstr ( '123456', 3) = '456'
기능 System.copy를 참조하십시오
예제 edit3.text : = rightstr (edit1.text, spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 midstr (const atext : string; const astart, acount : integer) :
문자열; $ [strutils.pas
함수는 astart에서 시작하는 문자열 atext acount 문자를 반환합니다.
그것은 사본을 의미합니다
기능 System.copy를 참조하십시오
예제 edit3.text : = midstr (edit1.text, spinedit1.value, spinedit2.value);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 기능 searchBuf (buf : pchar; buflen : integer; selstart, sellength :
정수;
pchar; $ [stratils.pas
기능은 첫 번째 검색 된 포인터 위치를 반환합니다
이 기능은 종종 텍스트에서 문자열을 검색하는 데 사용됩니다.
참조 <null>
예
///////// 시작 SearchBuf 시작
함수 searchEdit (editControl : tcustomedit; const searchString : String;
SearchOptions : tstringsearchoptions; findfirst : boolean = false) : 부울;
var
버퍼, P : PCHA;
크기 : 단어;
시작하다
결과 : = 거짓;
if (length (searchString) = 0) 그런 다음 종료;
크기 : = editControl.getTextLen;
if (size = 0) 그런 다음 종료하십시오.
버퍼 : = Stralloc (size + 1);
노력하다
editControl.getTextBuf (버퍼, 크기 + 1);
p : = searchBuf (버퍼, 크기, editControl.selstart, editControl.sellength,
SearchString, SearchOptions);
p <> nil이 시작되면 시작하십시오
editcontrol.selstart : = p- 버퍼;
editControl.sellength : = 길이 (SearchString);
결과 : = 참;
끝;
마지막으로
strdispose (버퍼);
끝;
끝;
절차 tform1.Button1click (sender : tobject);
var
SearchOptions : TStringsearchOptions;
시작하다
SearchOptions : = [];
CheckBox1.Checked 경우
포함 (SearchOptions, Sodown);
CheckBox2.Checked
포함 (searchOptions, somatchcase);
CheckBox3.Checked 경우
포함 (SearchOptions, SowHoleWord);
SearchEdit (memo1, edit1.text, searchOptions);
메모 1. 세트 포커스;
끝;
///////// 엔드 SearchBuf
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 soundex (const atext : string; alength : tsoundexlength = 4) :
문자열; $ [strutils.pas
함수 감지 문자열을 반환합니다
설명 : Detection Method (Soundex)에 따르면 교차점을 찾을 수 있습니다
참조 <null>
예제 edit2.text : = soundex (edit1.text, spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
헤더 함수 soundexint (const atext : 문자열; alength : tsoundexintlength =
4) : 정수; $ [strutils.pas
함수 감지 정수를 반환합니다
그것은 Allength의 값이 클수록 디코딩 정확도가 높아짐을 의미합니다.
참조 <null>
예제 spinedit2.value : = soundexInt (edit1.text, spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
헤더 함수 decodesoundexint (Avalue : Integer) : String [Strutils.pas
함수는 프로브 정수의 디코딩을 반환합니다
설명 decodesoundexint (soundexint ( 'Hello'))는 soundex ( 'hello')와 같습니다.
참조 <null>
예제 edit2.text : = decodesoundexint (spinedit2.value);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 soundExword (const atext : String) : Word [Strutils.pas
함수 감지 텍스트 값을 반환합니다
4로 고정 된 매개 변수 Alength가 없음을 나타냅니다.
참조 <null>
예제 spinedit2.value : = soundexword (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 decodesoundexword (avalue : word) : string [strutils.pas
함수 감지 텍스트 값의 디코딩을 반환합니다
설명 decodesoundexword (soundexword ( 'Hello'))는 soundex ( 'hello')와 같습니다.
참조 <null>
예제 edit2.text : = decodesoundexword (spinedit2.value);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 soundexSimilar (const atext, aother : string; alength :
tsoundexlength = 4) : 부울 [Strutils.pas
함수는 두 문자열의 프로브 문자열이 동일한 지 여부를 반환합니다.
설명 결과 : = soundex (atext, alength) = soundex (aother, allength)
참조 <null>
예제 Checkbox1.Checked : = soundExSimilar (edit1.text, edit2.text,
spinedit1.Value);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 soundexCompare (const atext, aother : string; alength :
tsoundexlength = 4) : 정수;
함수는 문자열을 감지하기 위해 두 줄을 비교 한 결과를 반환합니다.
설명 결과 : = ansicomparest (soundex (atext, allength), soundex (aother,
alength))
참조 함수 sysutils.ansicomparest
예제 spinedit2.value : = soundexCompare (edit1.text, edit2.text,
spinedit1.Value);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 soundExproc (const atext, aother : string) : 부울;
$ [strutils.pas
함수 호출 SoundexSimilar는 두 문자열의 프로브 문자열을 반환합니다.
시스템 변수 ansiresemblesproc의 기본값에 대한 설명
참조 함수 strutils.ansiresemblestext
예 [var ansiresemblesproc : tcomparetextProc = soundexProc;]
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 Newstr (Const S : String) : PSTRING;
함수 새 문자열 포인터 주소를 반환합니다
설명 문자열 s가 비어있을 때 nullstr을 반환합니다
절차 시스템을 참조하십시오
예
///////////// NewStr, Disposest를 시작합니다
절차 tform1.Button1click (sender : tobject);
var
P : PSTRING;
시작하다
p : = newstr (edit1.text);
edit2.text : = p^;
처분 (p);
끝;
//////////// END NEWSTR, DRISPOSTEST
━━━━━━━━━━━━━━━━━━━━━
첫 번째 절차 처분 (p : pstring);
함수 릴리스 문자열 포인터 P 리소스
설명 Newstr과 함께 사용하십시오
절차 시스템을 참조하십시오
예제 <위 참조, 아래 참조>
━━━━━━━━━━━━━━━━━━━━━
첫 번째 절차 할당 (var p : pstring; const s : string);
$ [sysutils.pas
함수 업데이트 문자열 s에 문자열 포인터 p
설명 값을 업데이트 할 때 이전에 문자열 포인터 인 리소스
참조 함수 sysutils.newstr; function sysutils.disposest
예
////////////////////////////////////////////////4이 시작됩니다
절차 tform1.Button1click (sender : tobject);
var
P : PSTRING;
시작하다
p : = nil;
할액 (p, edit1.text);
edit2.text : = p^;
처분 (p);
끝;
//////////// end assentstr
━━━━━━━━━━━━━━━━━━━━━
첫 번째 절차 부록 (var dest : string; const s : string);
$ [sysutils.pas
스트링 데스트 후 문자열을 부드링하십시오
설명은 dest + s와 동일합니다
참조 <null>
예
///////////// appendstr 시작
절차 tform1.Button1click (sender : tobject);
var
S : 문자열;
시작하다
s : = edit2.text;
부록 (s, edit1.text);
edit2.text : = s;
끝;
/////////// end appendstr
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 대문자 (const s : string) : String;
함수는 문자열의 자본 형태를 반환합니다
비 선수 케이스 문자가 처리되지 않았 음을 나타냅니다
절차 시스템을 참조하십시오. 세트 길이
예제 edit2.text : = 대문자 (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 소문자 (const s : string) : String;
함수는 문자열의 소문자 형태를 반환합니다
캡슐이 아닌 문자가 처리되지 않았 음을 나타냅니다
절차 시스템을 참조하십시오. 세트 길이
예제 edit2.text : = 소문자 (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 비교 (Const S1, S2 : String) : 정수;
함수는 두 문자를 비교하기 위해 반환됩니다
설명 S1 <S2가 값을 반환 할 때;
참조 <null>
예제 spinedit1.value : = comparest (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 비교 (P1, P2 : 포인터; 길이 : 정수) : 부울;
조립자; $ [syutils.pas
기능 반환 비교 두 가지 메모리 포인터
설명 comparemem (pchar ( '12a'), pchar ( '12c'), 2) = true; comparemem (pchar ( '12a'),
pchar ( '12c'), 3) = 거짓
참조 <null>
예제 CheckBox1.Checked : = 비교 (self, form1, 8);
━━━━━━━━━━━━━━━━━━━━━
헤더 함수 comparetext (const s1, s2 : string) : 정수 [sysutils.pas
두 문자열을 비교하기 위해 함수가 반환됩니다
사례 둔감을 나타냅니다
참조 <null>
예제 spinedit1.value : = comparetext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 sametext (const s1, s2 : string) : boolean [sysutils.pas
함수는 두 문자열이 동일 여부를 반환합니다
사례 둔감을 나타냅니다
참조 <null>
예제 CheckBox1.Checked : = sametext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansiuppercase (const s : string) : String [sysutils.pas
함수는 문자열의 자본 형태를 반환합니다
설명 ANSI (American National Standards Institute) American National Standards Institute;
참조 기능 Windows.charupperBuff
예제 edit2.text : = ansiuppercase (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansilowercase (const s : string) : String [sysutils.pas
함수는 문자열의 소문자 형태를 반환합니다
캡슐이 아닌 문자가 처리되지 않았 음을 나타냅니다
참조 기능 Windows.CharlowerBuff
예제 edit2.text : = ansilowercase (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 함수 Ansicomparest (const s1, s2 : string) : 정수 [sysutils.pas
두 문자열의 기능 역 비교
설명 S1 <S2가 값을 반환 할 때;
참조 기능 Windows.comparestring
예제 spinedit1.value : = ansicomparest (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 함수 AnsisAmest (const s1, s2 : string) : boolean [sysutils.pas
함수는 두 문자열이 동일 여부를 반환합니다
설명 사례에 민감합니다
참조 함수 sysutils.ansicomparest
예제 CheckBox1.Checked : = ansisAmest (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 ansicomparetext (const s1, s2 : string) : 정수;
두 문자열의 기능 역 비교
설명 S1 <S2가 값을 반환 할 때;
참조 기능 Windows.comparestring
예제 spinedit1.value : = ansicomparetext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 ansisametext (const s1, s2 : string) : boolean [sysutils.pas
함수는 두 문자열이 동일 여부를 반환합니다
사례 둔감을 나타냅니다
참조 함수 sysutils.ansicomparetext
예제 CheckBox1.Checked : = ansisAmetext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 ansistrcomp (S1, S2 : PCHA) : 정수;
함수는 두 개의 포인터 문자열을 비교하기 위해 반환됩니다
설명 S1 <S2가 값을 반환 할 때;
참조 기능 System.comparestring
예제 spinedit1.Value : = ansistrcomp (pchar (edit1.text), pchar (edit2.text))
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 Ansistricomp (S1, S2 : PCHA) : 정수;
함수는 두 개의 포인터 문자열을 비교하기 위해 반환됩니다
S1 <S2가 값을 반환 할 때;
참조 기능 Windows.comparestring
예제 spinedit1.Value : = ansistricomp (pchar (edit1.text), pchar (edit2.text))
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansistrlcomp (S1, S2 : PCHAR; MAXLEN : 추기경) : 정수;
$ [sysutils.pas
함수는 지정된 두 개의 포인터 문자열을 비교하기 위해 반환합니다
S1 <S2가 값을 반환 할 때;
참조 기능 Windows.comparestring
예제 spinedit1.Value : = ansistrlComp (pchar (edit1.text), pchar (edit2.text),
spinedit2.value)
━━━━━━━━━━━━━━━━━━━━━
첫 번째 기능 ansistrlicomp (S1, S2 : PCHAR; MAXLEN : 추기경) : 정수;
$ [sysutils.pas
함수는 지정된 두 개의 포인터 문자열을 비교하기 위해 반환합니다
설명 S1 <S2가 값을 반환 할 때;
참조 기능 Windows.comparestring
예제 spinedit1.Value : = ansistrlicomp (pchar (edit1.text), pchar (edit2.text),
spinedit2.value)
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 ansistrlower (str : pchar) : pchar;
함수는 포인터 문자열 소문자를 반환합니다
캡슐이 아닌 문자가 처리되지 않았 음을 나타냅니다
참조 기능 Windows.Charlower
예제 edit2.text : = ansistrlower (pchar (edit1.text));
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 ansistrupper (str : pchar) : pchar;
함수는 포인터 문자열 대문자를 반환합니다
비 선수 케이스 문자가 처리되지 않았 음을 나타냅니다
참조 기능 Windows.charupper
예제 edit2.text : = ansistrupper (pchar (edit1.text));
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 Ansilastchar (const s : string) : pchar;
함수 문자열 s의 마지막 포인터 문자를 반환합니다.
설명 문자열 S가 빈 문자열 인 경우 널 포인터가 반환됩니다.
참조 함수 sysutils.bytetype
예제 edit2.text : = ansilastchar (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 ansistrlastchar (p : pchar) : pchar;
함수는 포인터 문자열 P의 마지막 포인터 문자를 반환합니다.
설명 문자열 p가 빈 포인터 인 경우 빈 포인터를 반환합니다.
참조 함수 sysutils.bytetype
예제 edit2.text : = ansilastchar (pchar (edit1.text));
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 WideUpperCase (const s : wideString) : wideString [sysutils.pas
함수는 이중 바이트 문자열의 대문자를 반환합니다
설명 WideChar 이중 바이트 문자
참조 기능 Windows.charupperBuffw
예제 edit2.text : = wideUpperCase (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 widelowercase (const s : widestring) : widestring [sysutils.pas
함수 이중 바이트 문자열의 소문자 형태를 반환합니다
테스트 할 수없는 이유를 의미합니다
참조 기능 Windows.CharlowerBuffw
예제 edit2.text : = widelowercase (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 widecomparest (const s1, s2 : widestring) : 정수;
$ [sysutils.pas
두 개의 이중 바이트 문자열의 기능 반환 비교
설명 S1 <S2가 값을 반환 할 때;
참조 기능 Windows.comParestringw
예제 spinedit1.value : = widecomparest (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 WIDESAMEST (Const S1, S2 : Widestring) : Boolean [Sysutils.pas
함수는 두 개의 더블 바이트 문자열이 동일 여부를 반환합니다
설명 사례에 민감합니다
참조 함수 sysutils.widecomparest
예제 CheckBox1.Checked : = WidesAmest (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 widecomparetext (const s1, s2 : widestring) : 정수;
$ [sysutils.pas
두 개의 이중 바이트 문자열의 기능 반환 비교
설명 S1 <S2가 값을 반환 할 때;
참조 기능 Windows.comParestringw
예제 spinedit1.value : = widecomparetext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 WIDESAMETEXT (Const S1, S2 : widestring) : 부울;
$ [sysutils.pas
함수는 두 개의 더블 바이트 문자열이 동일 여부를 반환합니다
사례 둔감을 나타냅니다
참조 함수 sysutils.widecomparetext
예제 CheckBox1.Checked : = WideAmetext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 트림 (const s : string) : string;
첫 번째 기능 트림 (const s : widestring) : wideString;
$ [sysutils.pas
함수는 문자열 s의 왼쪽 및 오른쪽 문자를 제거하기 위해 반환됩니다.
#32 미만이 보이지 않는 문자로 간주되는 문자
기능 System.copy를 참조하십시오
예제 edit2.text : = trim (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 trimleft (const s : string) : String;
첫 번째 기능 TrimLeft (const s : widestring) : widestring;
$ [sysutils.pas
함수 리턴 문자열 s 왼쪽에있는 보이지 않는 문자를 제거합니다.
#32 미만이 보이지 않는 문자로 간주되는 문자
기능 System.copy를 참조하십시오
예제 edit2.text : = trimleft (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 trimright (const s : String);
첫 번째 기능 trimright (const s : widestring) : widestring;
$ [sysutils.pas
함수 리턴 문자열 s 오른쪽에있는 보이지 않는 문자를 제거합니다.
#32 미만이 보이지 않는 문자로 간주되는 문자
기능 System.copy를 참조하십시오
예제 edit2.text : = trimright (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 함수 quotedstr (const s : string) : String [sysutils.pas
함수는 파스칼에서 문자열 s의 표현을 반환합니다.
설명 : 단일 견적으로 하나의 단일 인용문이 2 개로 변환됩니다.
프로 시저 시스템을 참조하십시오
예제 edit2.text : = quotedstr (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansiquotedstr (const s : string; quote : char) : String;
$ [sysutils.pas
함수 문자열 S 표현식을 문자 따옴표로 인용문으로 반환합니다.
설명 ansiquotedstr ( 'Hello "World',
'@') = '@hello "world@'; ansiquotedstr ( 'hello"world', ' ") ='"hello ""world " '
참조 함수 sysutils.anistrscan
예 edit2.text : = ansiquotedstr (edit1.text, ' ");
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansiextractquotedstr (var src : pchar; quote : char) : 문자열;
$ [sysutils.pas
함수는 문자 인용문의 원래 형태를 따옴표로 반환합니다.
이는 표현이 불법 일 때 SRC가 변경되지 않음을 의미합니다.
참조 함수 sysutils.anistrscan
예
////////// ansiextrackquotedstr를 시작합니다
절차 tform1.Button1click (sender : tobject);
var
P : PCHA;
시작하다
p : = pchar (edit1.text);
edit2.text : = ansiextractquotedstr (p, ' ");
edit3.text : = p;
끝;
///////// 엔드 ansiextractquotedstr
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 ansidequotedstr (const s : string; aquote : char) : String;
$ [sysutils.pas
함수는 문자 Aquote의 원래 형태를 따옴표로 반환합니다.
표현이 불법이면 s
참조 함수 sysutils.ansiextractquotedstr
예제 edit2.text : = ansidequotedstr (edit1.text, ' "');
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 조정 라인 브레이크 (const s : string; style : ttextlinebreakstyle =
{$ ifdef linux} tlbslf {$ endif} {$ ifdef mswindows} tlbscrlf {$ endif}) :
문자열; $ [sysutils.pas
주어진 문자열의 라인 분리기를 CR/LF 시퀀스로 조정하기 위해 함수가 반환됩니다.
설명
조정 라인 브레이크 ( '1'#13'2 '#13) ='1 '1'#13#10'2 '#13#10; 조정 라인 브레이크 ('1 '#10'2'#10) = '1'#13#10 '2'#13#10
참조 기능 sysutils.strnextchar
예 <null>
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 IsValidident (const Idr : String) : boolean [sysutils.pas
함수는 문자열 ID가 올바른 식별자인지 여부를 반환합니다.
설명 식별자 :: 문자 | 밑줄을 밑줄을 긋습니다 [문자 | 밑줄 | 숫자] ...
참조 <null>
예제 CheckBox1.Checked : = isValidident (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
헤더 함수 inttostr (value : Integer);
헤더 함수 inttostr (value : int64);
함수는 정수 값을 리턴하여 문자열로 변환합니다
설명 형식 ( '%d', [value])
참조 함수 sysutils.fmtstr
예제 edit2.text : = inttostr (spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 inttoHex (값 : 정수; 숫자) : String;
$ [sysutils.pas
첫 번째 함수 inttoHex (value : int64; digits) : String;
$ [sysutils.pas
함수는 16 진수 성능 결과로 변환 된 정수 값을 반환합니다 ( '%.*x', [숫자, 값]).
설명 매개 변수 숫자는 문자의 최소 너비를 지정합니다.
참조 함수 sysutils.fmtstr
예제 edit2.text : = inttohex (spinedit1.value, spinedit2.value);
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 strtoint (const s : string) : 정수;
함수는 문자열을 반환하여 정수로 변환합니다.
설명 : 문자열이 비 통신으로 표현 될 때 예외가 발생합니다.
Process System.val을 참조하십시오
예제 spinedit1.value : = strtoint (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 strtointDef (const s : string; 기본값 : 정수) : 정수;
$ [sysutils.pas
함수는 문자열을 반환하여 정수로 변환합니다.
문자열이 비 통신으로 표현되면 기본값이 반환됩니다.
Process System.val을 참조하십시오
예제 spinedit1.value : = strtointDef (edit1.text, 0);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 trystrtoint (const s : string; out value : Integer) : 부울;
$ [sysutils.pas
함수는 문자열 S가 정수 값으로 성공적으로 변환되는지 여부를 반환합니다.
설명 허위는 문자열이 비 인트거로 표현되면 반환되고 값은 0으로 출력됩니다.
Process System.val을 참조하십시오
예
///////// 시작 trystrtoint 시작
절차 tform1.Button1click (sender : tobject);
var
I : 정수;
시작하다
CheckBox1.Checked : = trystrToint (edit1.text, i);
spinedit1. value : = i;
끝;
///////// END TRYSTRTOINT
━━━━━━━━━━━━━━━━━━━━━
헤더 기능 strtoint64 (const s : string) : int64;
함수는 문자열 S를 반환하여 64 비트 정수로 변환합니다.
설명 : 문자열이 비 64 비트 정수로 표현되면 예외가 발생합니다.
Process System.val을 참조하십시오
예제 spinedit1.value : = strtoint64 (edit1.text);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 strtoint64def (const s : string; const default : int64) : int64;
$ [sysutils.pas
함수는 문자열 S를 반환하여 64 비트 정수로 변환합니다.
문자열이 비 64 비트 정수로 표현되면 기본값이 반환됩니다.
Process System.val을 참조하십시오
예제 spinedit1.value : = strtoint64def (edit1.text, 0);
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 TrystrToint64 (const s : string; out value : int64) : boolean;
$ [sysutils.pas
함수는 문자열 s가 64 비트 정수 값으로 성공적으로 변환되는지 여부를 반환합니다.
설명 허위는 문자열이 비 64 비트 정수로 표현되면 반환되고 값은 0으로 출력됩니다.
Process System.val을 참조하십시오
예
///////// 시작 trystrtoint64 시작
절차 tform1.Button1click (sender : tobject);
var
I : int64;
시작하다
CheckBox1.Checked : = TrystrToint64 (edit1.text, i);
spinedit1. value : = i;
끝;
///////// END TRYSTRTOING64
━━━━━━━━━━━━━━━━━━━━━
첫 번째 함수 strtobool (const s : string) : boolean [sysutils.pas
함수는 문자열 s를 반환하여 논리 값으로 변환합니다.
설명 문자는 논리적으로 표현되지 않을 때 예외를 유발합니다.
참조 기능 sysutils.trystrtobool
例子CheckBox1.Checked := StrToBool(Edit1.Text);
━━━━━━━━━━━━━━━━━━━━━
首部function StrToBoolDef(const S: string; const Default: Boolean):
Boolean; $[SysUtils.pas
功能返回字符串S转换成逻辑值
说明字符非逻辑表达时则返回默认值Default
参考function SysUtils.TryStrToBool
例子CheckBox1.Checked := StrToBoolDef(Edit1.Text, False);
━━━━━━━━━━━━━━━━━━━━━
首部function TryStrToBool(const S: string; out Value: Boolean): Boolean;
$[SysUtils.pas
功能返回字符串S转换成逻辑值Value是否成功
说明[注意]0为假非0为真;不是'True'和'False';Delphi6 Bug 如下修正
参考function SysUtils.AnsiSameText;var SysUtils.TrueBoolStrs;var
SysUtils.FalseBoolStrs
예
///////Begin TryStrToBool
절차 tform1.Button1click (sender : tobject);
var
B: Boolean;
시작하다
SetLength(TrueBoolStrs, 2);
SetLength(FalseBoolStrs, 2);
TrueBoolStrs[0] := 'True';
FalseBoolStrs[0] := 'False';
TrueBoolStrs[1] := 'Yes';
FalseBoolStrs[1] := 'No';
CheckBox1.Checked := TryStrToBool(Edit1.Text, B);
CheckBox2.Checked := B;
끝;
///////End TryStrToBool
첨부된
///////Begin TryStrToBool
function TryStrToBool(const S: string; out Value: Boolean): Boolean;
function CompareWith(const aArray: array of string): Boolean;
var
I: Integer;
시작하다
Result := False;
for I := Low(aArray) to High(aArray) do
if AnsiSameText(S, aArray[I]) then
시작하다
Result := True;
부서지다;
끝;
끝;
var
LResult: Extended;
시작하다
Result := TryStrToFloat(S, LResult);
if Result then
Value := LResult <> 0
또 다른
시작하다
Result := True; //修正处
VerifyBoolStrArray;
if CompareWith(TrueBoolStrs) then
Value := True
else if CompareWith(FalseBoolStrs) then
Value := False
또 다른
Result := False;
끝;
끝;
///////End TryStrToBool
━━━━━━━━━━━━━━━━━━━━━
首部function BoolToStr(B: Boolean; UseBoolStrs: Boolean = False): string;
$[SysUtils.pas
功能返回逻辑值B转换成字符串
说明BoolToStr(False, False)='0';BoolToStr(False, True)='-1'
参考var SysUtils.TrueBoolStrs;var SysUtils.FalseBoolStrs
例子Edit1.Text := BoolToStr(CheckBox1.Checked, CheckBox2.Checked);
━━━━━━━━━━━━━━━━━━━━━
首部function LoadStr(Ident: Integer): string; $[SysUtils.pas
功能返回根据标识Ident的字符串资源
说明字符串资源是指程序的内部资源
参考function SysUtils.FindStringResource
例子Edit2.Text := LoadStr(StrToIntDef(Edit1.Text, 0));
━━━━━━━━━━━━━━━━━━━━━
首部function FmtLoadStr(Ident: Integer; const Args: array of const):
string; $[SysUtils.pas
功能返回格式化的字符串资源
说明字符串资源是指程序的内部资源
参考function SysUtils.FmtStr;function SysUtils.FindStringResource
例子<NULL>;
━━━━━━━━━━━━━━━━━━━━━
首部function StrLen(const Str: PChar): Cardinal; $[SysUtils.pas
功能返回指针字符串的长度
说明当指针字符串Str为nil时将触发异常
参考<NULL>
例子SpinEdit2.Value := StrLen(PChar(Edit1.Text));
━━━━━━━━━━━━━━━━━━━━━
首部function StrEnd(const Str: PChar): PChar; $[SysUtils.pas
功能返回指针字符串的结尾
说明当指针字符串Str为nil时将触发异常
参考<NULL>
例子Edit2.Text := StrEnd(PChar(Edit1.Text)) - SpinEdit1.Value;
━━━━━━━━━━━━━━━━━━━━━
首部function StrMove(Dest: PChar; const Source: PChar; Count: Cardinal):
PChar; $[SysUtils.pas
功能返回将指针字符串Source指定内存数量Count复制覆盖到指针字符串Dest中
说明Dest没有分配资源将触发异常s
参考function System.Move
예
///////Begin StrMove
절차 tform1.Button1click (sender : tobject);
var
vBuffer: PChar;
시작하다
vBuffer := '0123456789';
StrMove(vBuffer, PChar(Edit1.Text), SpinEdit1.Value);
Edit2.Text := vBuffer;
끝;
///////End StrMove
━━━━━━━━━━━━━━━━━━━━━
首部function StrCopy(Dest: PChar; const Source: PChar): PChar;
$[SysUtils.pas
功能返回将指针字符串Source复制到指针字符串Dest中
说明Dest应已经分配足够的空间非则将触发异常
参考<NULL>
예
///////Begin StrCopy
절차 tform1.Button1click (sender : tobject);
var
vBuffer: PChar;
시작하다
GetMem(vBuffer, Length(Edit1.Text) + 1);
StrCopy(vBuffer, PChar(Edit1.Text));
Edit2.Text := vBuffer;
FreeMem(vBuffer);
끝;
///////End StrCopy
━━━━━━━━━━━━━━━━━━━━━
首部function StrECopy(Dest:PChar; const Source: PChar): PChar;
$[SysUtils.pas
功能返回将指针字符串Source复制到指针字符串Dest中的结尾
说明可以连接指针字符串
参考<NULL>
예
///////Begin StrECopy
절차 tform1.Button1click (sender : tobject);
var
vBuffer: array[0..255] of Char;
시작하다
StrECopy(StrECopy(vBuffer, PChar(Edit1.Text)), PChar(Edit2.Text));
Edit3.Text := vBuffer;
끝;
///////End StrECopy
━━━━━━━━━━━━━━━━━━━━━
首部function StrLCopy(Dest: PChar; const Source: PChar; MaxLen: Cardinal):
PChar; $[SysUtils.pas
功能返回将指针字符串Source指定长度MaxLen复制到指针字符串Dest中
说明Dest应已经分配足够的空间非则将触发异常
参考<NULL>
예
///////Begin StrLCopy
절차 tform1.Button1click (sender : tobject);
var
vBuffer: array[0..255] of Char;
시작하다
StrLCopy(vBuffer, PChar(Edit1.Text), SpinEdit1.Value);
Edit2.Text := vBuffer;
끝;
///////End StrLCopy
━━━━━━━━━━━━━━━━━━━━━
首部function StrPCopy(Dest: PChar; const Source: string): PChar;
$[SysUtils.pas
功能返回将指针字符串Source复制到指针字符串Dest中
说明StrLCopy(Dest, PChar(Source), Length(Source))
参考function SysUtils.StrLCopy
예
///////Begin StrPCopy
절차 tform1.Button1click (sender : tobject);
var
vBuffer: array[0..255] of Char;
시작하다
StrPCopy(vBuffer, PChar(Edit1.Text));
Edit2.Text := vBuffer;
끝;
///////End StrPCopy
━━━━━━━━━━━━━━━━━━━━━
首部function StrPLCopy(Dest: PChar; const Source: string; MaxLen:
Cardinal): PChar; $[SysUtils.pas
功能返回将字符串Source指定长度MaxLen复制到指针字符串Dest中
说明StrLCopy(Dest, PChar(Source), MaxLen)
参考function SysUtils.StrLCopy
예
///////Begin StrPLCopy
절차 tform1.Button1click (sender : tobject);
var
vBuffer: array[0..255] of Char;
시작하다
StrPLCopy(vBuffer, Edit1.Text, SpinEdit1.Value);
Edit2.Text := vBuffer;
끝;
///////End StrPLCopy
━━━━━━━━━━━━━━━━━━━━━
首部function StrCat(Dest: PChar; const Source: PChar): PChar;
$[SysUtils.pas
功能返回连接指针字符串Dest和指针字符串Source
说明StrCopy(StrEnd(Dest), Source)
参考function SysUntils.StrCopy
예
///////Begin StrCat
절차 tform1.Button1click (sender : tobject);
var
vBuffer: array[0..255] of Char;
시작하다
StrPCopy(vBuffer, Edit1.Text);
StrCat(vBuffer, PChar(Edit2.Text));
Edit3.Text := vBuffer;
끝;
///////End StrCat
━━━━━━━━━━━━━━━━━━━━━
首部function StrLCat(Dest: PChar; const Source: PChar; MaxLen: Cardinal):
PChar; $[SysUtils.pas
功能返回连接指针字符串Dest和指针字符串Source
说明[注意]MaxLen指定连接后的最大长度不是指针字符串Source的长度
参考<NULL>
예
///////Begin StrLCat
절차 tform1.Button1click (sender : tobject);
var
vBuffer: array[0..255] of Char;
시작하다
StrPCopy(vBuffer, Edit1.Text);
StrLCat(vBuffer, PChar(Edit2.Text), SpinEdit1.Value);
Edit3.Text := vBuffer;
끝;
///////End StrLCat
━━━━━━━━━━━━━━━━━━━━━
首部function StrComp(const Str1, Str2: PChar): Integer; $[SysUtils.pas
功能返回比较两个指针字符串
说明当S1>S2返回值>0;当S1<S2返回值<0;当S1=S2返回值=0;区分大小写;[注意]返回第一个出现不同字符的差异
参考<NULL>
例子SpinEdit1.Value := StrComp(PChar(Edit1.Text), PChar(Edit2.Text));
━━━━━━━━━━━━━━━━━━━━━
首部function StrIComp(const Str1, Str2: PChar): Integer; $[SysUtils.pas
功能返回比较两个指针字符串
说明当S1>S2返回值>0;当S1<S2返回值<0;当S1=S2返回值=0;不区分大小写;[注意]返回第一个出现不同字符的差异
参考<NULL>
例子SpinEdit1.Value := StrIComp(PChar(Edit1.Text), PChar(Edit2.Text));
━━━━━━━━━━━━━━━━━━━━━
首部function StrLComp(const Str1, Str2: PChar; MaxLen: Cardinal): Integer;
$[SysUtils.pas
功能返回比较两个指针字符串指定长度
说明当S1>S2返回值>0;当S1<S2返回值<0;当S1=S2返回值=0;区分大小写;Length(长度);[注意]返回第一个出现不同字符的差异
参考<NULL>
例子SpinEdit1.Value := StrLComp(PChar(Edit1.Text), PChar(Edit2.Text),
SpinEdit2.Value)
━━━━━━━━━━━━━━━━━━━━━
首部function StrLIComp(const Str1, Str2: PChar; MaxLen: Cardinal): Integer;
$[SysUtils.pas
功能返回比较两个指针字符串指定长度
说明当S1>S2返回值>0;当S1<S2返回值<0;当S1=S2返回值=0;不区分大小写;[注意]返回第一个出现不同字符的差异
参考<NULL>
例子SpinEdit1.Value := StrLIComp(PChar(Edit1.Text), PChar(Edit2.Text),
SpinEdit2.Value)
━━━━━━━━━━━━━━━━━━━━━
首部function StrScan(const Str: PChar; Chr: Char): PChar; $[SysUtils.pas
功能返回在指针字符串Str搜索字符Chr第一个出现的地址
说明没有找到则返回空指针
参考<NULL>
例子Edit2.Text := StrScan(PChar(Edit1.Text), '*');
━━━━━━━━━━━━━━━━━━━━━
首部function StrRScan(const Str: PChar; Chr: Char): PChar; $[SysUtils.pas
功能返回在指针字符串Str搜索字符Chr最后一个出现的地址
说明没有找到则返回空指针
参考<NULL>
例子Edit2.Text := StrRScan(PChar(Edit1.Text), '*');
━━━━━━━━━━━━━━━━━━━━━
首部function StrPos(const Str1, Str2: PChar): PChar; $[SysUtils.pas
功能返回指针字符串Str2在Str1中第一个出现的地址
说明没有找到则返回空指针;StrPos('12345', '3') = '345'
参考<NULL>
例子Edit3.Text := StrPos(PChar(Edit1.Text), PChar(