[Overview][Constants][Types][Procedures and functions] Reference for unit 'strutils' (#rtl)

Copy2SymbDel

Deletes and returns all characters in a string till a given character (not included).

Declaration

Source position: strutils.pp line 146

function Copy2SymbDel(

  var S: String;

  Symb: Char

):String;

Arguments

S

  

String to delete and 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 occurence of the given character.

Description

Copy2SymbDeldetermines the position of the first occurrence of Symbin the string Sand returns all characters up to this position. The Symbcharacter itself is not included in the result string. All returned characters, notincluding the Symbcharacter, are deleted from the string S, after which it is right-trimmed. If Symbdoes not appear in S, then the whole of Sis returned, and Sitself is emptied.

Errors

None.

See also

Copy2SpaceDel

  

Deletes and returns all characters in a string till the first space character (not included).

Copy2Symb

  

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