ibec_PosEx

Returns the index value of the first character in a specified substring that occurs in a given string.

Syntax

    function ibec_PosEx(Substr : string; S : string; StartPos : integer) : integer;

The only difference between the ibec_Pos and ibec_PosEx functions is the StartPos parameter which defines the starting position for scanning.

Example

  execute IBEBlock
  returns (vcresult varchar(100))
  as
  begin
    for select rdb$relation_name
        from rdb$relations
        into :sname
    do
    begin
      sname = ibec_trim(sname);
      vcresult = '';
      if (ibec_PosEx('$', sname, 4) = 4) then
        vcresult = sname || ' is a system or IBExpert table';
      else
        vcresult = sname || ' is an user table';
      suspend;
    end
  end

See also:
ibec_Pos

back to top of page
<< ibec_Pos | IBEBlock | ibec_Trim >>