Fonction de l'en-tête Rightstr (const Atext: String; const Account: Integer): String;
La fonction renvoie les caractères acantis sur le côté droit de la chaîne Atext
Description Rightstr («123456», 3) = «456»
Reportez-vous à Function System.Copy
Exemple Edit3.Text: = Rightstr (edit1.Text, Spinedit1.Value);
━━━━━━━━━━━━━━━━━━━━━
Fonction de l'en-tête Midstr (const Atext: String; const Astart, acont: entier): String;
La fonction renvoie la chaîne Atext Count Caractères à partir d'Astart
Cela signifie copier
Reportez-vous à Function System.Copy
Exemple edit3.text: = midstr (edit1.text, spinedit1.value, spinedit2.value);
━━━━━━━━━━━━━━━━━━━━━
Fonction en tête SearchBuf (Buf: PCHAR; Buflen: entier; Selstart, Sellfast: Integer; SearchString: String; Options: TStringSearchOptions = [Sodown]): PCHARD;
La fonction renvoie la première position de pointeur recherché
Expliquer cette fonction est souvent utilisée pour rechercher des chaînes dans le texte
Référence <null>
exemple
////////// commencer SearchBuf
Fonction SearchEdit (editControl: tCustomEdit; const SearchString: String;
SearchOptions: tStringSearchOptions;
var
Tampon, p: phar;
Taille: mot;
Commencer
Résultat: = false;
if (le long (searchString) = 0) puis sortir;
Taille: = editControl.getTextlen;
if (size = 0) puis sortir;
Tampon: = stralloc (taille + 1);
essayer
EditControl.getTextBuf (tampon, taille + 1);
P: = SearchBuf (tampon, taille, editControl.SelStart, editControl.Sellngth,
SearchString, SearchOptions);
Si p <> nil alors commencez
EditControl.SeLStart: = p - tampon;
EditControl.Sellngth: = length (SearchString);
Résultat: = true;
fin;
Enfin
Strdispose (tampon);
fin;
fin;
Procédure tform1.button1Click (expéditeur: tobject);
var
SearchOptions: TStringSearchOptions;
Commencer
SearchOptions: = [];
Si Checkbox1. est venu alors
Inclure (Searchoptions, Sodown);
Si Checkbox2.Cherad a alors
Inclure (SearchOptions, Somatchcase);
Si Checkbox3.Ched a alors
Inclure (SearchOptions, Sowholeword);
SearchEdit (Memo1, edit1.Text, SearchOptions);
Memo1.setfocus;
fin;
////////// end SearchBuf
━━━━━━━━━━━━━━━━━━━━━
Fonction de l'en-tête SoundEx (constante: String; alngle: tSoundExLength = 4): String;
La fonction renvoie la chaîne de détection
Explication: Selon la méthode de détection (SoundEx), vous pouvez trouver la chaîne d'intersection;
Référence <null>
Exemple Edit2.Text: = SoundEx (edit1.Text, Spinedit1.Value);
━━━━━━━━━━━━━━━━━━━━━
En-tête SoundExint (constante: String; alngle: tSoundExIntLength = 4): entier;
La fonction renvoie l'entier de détection
Cela signifie que plus la valeur de la valeur de la longueur est élevée, plus la précision du décodage est élevée
Référence <null>
Exemple Spinedit2.Value: = SoundExint (edit1.Text, Spinedit1.Value);
━━━━━━━━━━━━━━━━━━━━━
Fonction d'en-tête DecodeSoundExint (Avalue: entier): String;
La fonction renvoie le décodage de l'entier de sonde
Description DecodeSoundExint (SoundExint ('Hello')) est équivalent à SoundEx ('Hello')
Référence <null>
Exemple Edit2.Text: = DecodeSoundExint (Spinedit2.Value);
━━━━━━━━━━━━━━━━━━━━━
First Fonction SoundExword (constante: String): Word;
La fonction renvoie la valeur du texte de détection
Indique qu'il n'y a pas de paramètre qui a été fixé à 4
Référence <null>
Exemple Spinedit2.Value: = SoundExword (edit1.Text);
━━━━━━━━━━━━━━━━━━━━━
Première fonction DecodeSoundExword (Avalue: Word): String;
La fonction renvoie le décodage de la valeur de texte de détection
Description DecodeSoundExWord (SoundExword ('Hello')) est équivalent à SoundEx ('Hello')
Référence <null>
Exemple Edit2.Text: = DecodeSoundExword (Spinedit2.Value);
━━━━━━━━━━━━━━━━━━━━━
Fonction de tête SoundExsimilar (Constère, une autre: String; alngot: tSoundExLength = 4): Boolean;
La fonction renvoie si les chaînes de sonde des deux chaînes sont les mêmes
DESCRIPTION Résultat: = SoundEx (atext, alngle) = SoundEx (un autre, alngot)
Référence <null>
Exemple Checkbox1.Checked: = SoundExsimilar (edit1.Text, edit2.Text, Spinedit1.Value);
━━━━━━━━━━━━━━━━━━━━━
Fonction en tête SoundExCompare (constance, une autre: String; alngle: tSoundExLength = 4): entier;
La fonction renvoie le résultat de la comparaison de deux chaînes pour détecter les chaînes
DESCRIPTION Résultat: = ANSICOMCARESTR (SONonEx (Atext, Alength), SoundEx (un autre, ALONGTH))
Fonction de référence sysutils.SansicaCarestr
Exemple Spinedit2.Value: = SoundExCompare (edit1.Text, edit2.Text, Spinedit1.Value);
━━━━━━━━━━━━━━━━━━━━━
First Fonction SoundExproc (Constère, une autre: String): Boolean;
Fonction Call SoundExsimilaire pour retourner les chaînes de sonde des deux chaînes.
Description de la valeur par défaut de la variable système ANSiRESEMBLESPROC
Fonction de référence strutils.ansiresemblesText
Exemple [var anSireseMblesProc: tCompareTextProc = SoundExProc;]