F_

<< F_SUBSTR (F_SUBSTR4, F_SUBSTR8) F_BIGSUBSTR U_SUBSTR F_STRSUB F_STRPOS | IBExpert UDF Functions | F_STRRM U_STRRM >>

F_SUBSTRN (F_SUBSTR) U_SUBSTR

 
  • function from adhoc
  • Compatible with UTF-8
  • Input VARCHAR(8190) String 1 (in which the position of parameter 2 is to be determined), VARCHAR(1024) String 2 (to be determin)
  • Output INTEGER first position in string 1 where string 2 starts

F_STRSUBN function from adhoc

  • Input VARCHAR(1024) String 1 (to be determin), VARCHAR(8190) String 2 (in which the position of parameter 2 is to be determined)
  • Output INTEGER first position in string 2 where string 1 starts

The formerly functions (F_SUBSTR and F_STRSUB) return -1 if the string is not found.

Example

 SELECT NULL AS ISCORRECT, F_SUBSTRN('John like to drive fast', 'dive') FROM RDB$DATABASE;

Expected results:

 ISCORRECT    F_SUBSTRN
 ========= ============
 <null>          <null>

Example

 SELECT NULL AS ISCORRECT, F_STRSUBN('dive', 'John like to drive fast' ) FROM RDB$DATABASE

Expected results:

 ISCORRECT    F_STRSUBN
 ========= ============
 <null>          <null>

; back to top of page
<< F_SUBSTR (F_SUBSTR4, F_SUBSTR8) F_BIGSUBSTR U_SUBSTR F_STRSUB F_STRPOS | IBExpert UDF Functions | F_STRRM U_STRRM >>