Strlen FR
From SA-MP Wiki
(Difference between revisions)
Revision as of 23:29, 26 December 2013 Connor Mead (Talk | contribs) ← Previous diff |
Revision as of 23:31, 26 December 2013 Connor Mead (Talk | contribs) Next diff → |
||
Line 10: | Line 10: | ||
<pawn> | <pawn> | ||
- | new stringLength = strlen("This is an example string."); // stringLength is now set to 26 | + | new stringLength = strlen("This is an example string."); // stringLength est maintenant égal à 26 |
</pawn> | </pawn> | ||
Revision as of 23:31, 26 December 2013
Page d'Accueil | Les Fonctions | Les Callbacks | Les bases du Scripting | Plugins de Serveur | Tutoriaux
Ne prenez pas en compte les FR dans les noms
Description:
Obtient la longueur d'une chaîne de caractère.
(const string[])
const string[] | La chaîne dont vous voulez obtenir la longueur. |
Return Values:
La longueur de la chaîne en un chiffre.
new stringLength = strlen("This is an example string."); // stringLength est maintenant égal à 26
Fonctions Relatives
Les fonctions suivantes peuvent être utiles car elles sont indirectement ou directement liées a cette fonction.
- strcmp: Compare two strings to check if they are the same.
- strfind: Search for a string in another string.
- strtok: Get the next 'token' (word/parameter) in a string.
- strdel: Delete part of a string.
- strins: Insert text into a string.
- strmid: Extract part of a string into another string.
- strpack: Pack a string into a destination string.
- strval: Convert a string into an integer.
- strcat: Concatenate two strings into a destination reference.