ibec_Copy

Returns a substring of a string.

Syntax

  function ibec_Copy(S : string; Index, Count: Integer): string;

Description

S is an expression of a string. Index and Count are integer-type expressions. ibec_Copy returns a substring containing Count characters starting at S[Index]. If Index is larger than the length of S, ibec_Copy returns an empty string.

If Count specifies more characters than are available, only the characters from S[Index] to the end of S are returned.

Example

  execute IBEBlock
  returns (proc_name varchar(31), proc_src varchar(255))
  as
  begin
    for
      select rdb$procedure_name, rdb$procedure_source
      from rdb$procedures
      order by rdb$procedure_name
      into :proc_name, :proc_src
    do
    begin
      proc_src = ibec_Copy(proc_src, 1, 255);
      suspend;
    end
  end

See also:
ibec_Length
ibec_Pos

back to top of page
<< ibec_Coalesce | IBEBlock | ibec_CopyToClipboard >>