JCL Help:StrToken@AnsiString@AnsiChar

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns a sub-string from S which is followed by Separator and deletes the sub-string from S including the separator.


Pascal

 function StrToken(var S: string; Separator: Char): string;
function StrToken(var S: AnsiString; Separator: AnsiChar): AnsiString;


Parameters

Parameters Description
var S: string The string you want to return the part after the Separator.
Separator: Char A character which determines where to break the string up at.


Return Value

Any part of S in front of Separator, or the original string if Separator was not located in S. S returns the remaining portion of the string after (but not including) Separator. If Separator was not found, S is an empty string.


Description

Splits a string into the part preceding the separator, which is returned as function result, and the part following the separator which is placed in S. If no separator is contained in the string then the string is returned as the function result and S becomes an empty string.


See Also

StrTokenToStrings


About

Unit

JclAnsiStrings


Donator

Huanlin Tsai


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page