Sign in Join
FPDoc Onlineexperiment

Copy2Symb function

In unit StrUtils

Returns all characters in a string till a given character (not included).

Declaration

pascal
function Copy2Symb(const S: string; Symb: AnsiChar): string

Arguments

S

String to return first characters from.

Symb

Symbol till which characters will be copied. Will not be included in the result.

Function result

Characters from the string till the first occurrence of the given character.

Description

Copy2Symb determines the position of the first occurrence of Symb in the string S and returns all characters up to this position. The Symb character itself is not included in the result string. The string S is left untouched. If Symb does not appear in S, then the whole of S is returned.

Errors

None.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.