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

Copy2Space

Returns all characters in a string till the first space character (not included).

Declaration

Source position: strutils.pp line 147

function Copy2Space(

  const S: String

):String;

Arguments

S

  

String to return first characters from.

Function result

Characters from Still the first space.

Description

Copy2Spacedetermines the position of the first space in the string Sand returns all characters up to this position. The space character itself is not included in the result string. The string Sis left untouched. If there is no space in S, then the whole string Sis returned.

This function simply calls Copy2Symbwith the space (ASCII code 32) as the symbol argument.

Errors

None.

See also

Copy2Symb

  

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

Copy2SpaceDel

  

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