F_STRINGCOUNT

<< F_RWORDCOUNT | IBExpert UDF Functions | F_DOMAINFROMEMAIL >>

F_STRINGCOUNT

 
  • function from adhoc
  • compatible with UTF-8
  • Input VARCHAR(32760) String1,VARCHAR(254) String2
  • Output INTEGER Amount of String 2 in String 1

F_RSTRINGCOUNT

  • input/output-compatibility to rFunc (STRINGCOUNT)
  • Compatible with UTF-8
  • Input VARCHAR(254) String 1, VARCHAR(32760) String 2
  • Output INTEGER Amount of String 1 in String 2

Example

 SELECT 2 AS ISCORRECT, F_STRINGCOUNT( 'ABC 123 45678 9123', '123'), F_RSTRINGCOUNT('123', 'ABC 123 45678 9123') FROM RDB$DATABASE;

Expected results:

    ISCORRECT F_STRINGCOUNT F_RSTRINGCOUNT
 ============ ============= ==============
            2             2              2

Example

 SELECT 0 AS ISCORRECT, F_STRINGCOUNT( 'ABC 123 45678 9123', 'EFG'), F_RSTRINGCOUNT('EFG', 'ABC 123 45678 9123') FROM RDB$DATABASE;

Expected results:

    ISCORRECT F_STRINGCOUNT F_RSTRINGCOUNT
 ============ ============= ==============
            0             0              0

Example

 SELECT NULL AS ISCORRECT, F_RSTRINGCOUNT(NULL, NULL) FROM RDB$DATABASE;

Expected results:

 ISCORRECT F_RSTRINGCOUNT
 ========= ==============
 <null>            <null>            

back to top of page
<< F_RWORDCOUNT | IBExpert UDF Functions | F_DOMAINFROMEMAIL >>