meta data for this page
  •  

F_FINDWORD

compatibility to FreeUDFLib, FreeUDFLibC, FreeUDFLib AvERP

Entrypoint findword not compatible with UTF-8 - use U_FINDWORD

U_FINDWORD

function from adhoc

Entrypoint u_findword compatible with UTF-8


Inputs/Outputs

   Input      CSTRING(32760)      String, in which another string is to be looked for
              INTEGER	            position, at which the search in the string should starts
   Output     CSTRING(254)        word or a partial word, which starts at position parameter 2

Syntax

   Positioning starts with 0, that means 1.position = 0 and searches up to the first blank.
   In FireBird 2.0 returns <null> if parameter 2 < 0 or > length of parameter 1, all other cases '' (empty string).
   TestSQL
   SELECT 'ABC' AS ISCORRECT, F_FINDWORD('ABC 123 45678 9123', 0) FROM RDB$DATABASE;
   SELECT 'BC' AS ISCORRECT, F_FINDWORD('ABC 123 45678 9123', 1) FROM RDB$DATABASE;
   SELECT '123' AS ISCORRECT, F_FINDWORD('ABC 123 45678 9123', 3) FROM RDB$DATABASE;
   SELECT '123' AS ISCORRECT, F_FINDWORD('ABC 123 45678 9123', 4) FROM RDB$DATABASE;
   SELECT '' AS ISCORRECT, F_FINDWORD('ABC 123 45678 9123', 20) FROM RDB$DATABASE;
   SELECT NULL AS ISCORRECT, F_FINDWORD('ABC 123 45678 9123', 20) FROM RDB$DATABASE;
   SELECT NULL AS ISCORRECT, F_FINDWORD(NULL, NULL) FROM RDB$DATABASE;