Indy 9 | Content | Index | Reference

SplitString
Unit: IdStrings
Splits a string at the first occurrence of a delimiter.

    procedure SplitString(const AStr: String; const AToken: String; var VLeft: String; var VRight: String);

Unit
IdStrings
Parameters
const AStr: String
Value to be split.
const AToken: String
delimiter used to split the intial value.
var VLeft: String
portion of the split string prior to AToken.
var VRight: String
portion of the split string after AToken.
Description
SplitString is a procedure used to separate the string value in AStr at the first occurrence of AToken in the value. When AStr contains the value in AToken, VLeft wil contain the part of AStr prior to AToken and VRight wil contain the part of AStr after AToken. If AToken does not occur in AStr, VLeft contains the value in AStr and VRight contains an empty string ('').

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.