F_WORDCOUNT

<< F_STRINGLISTITEM | IBExpert UDF Functions | F_RWORDCOUNT >>

F_WORDCOUNT

 
  • function from adhoc
  • Compatible with UTF-8
  • Input VARCHAR(32760) String in which the amount of words are to be calculated
  • Output INTEGER amount of words in the string

A word ends with one ore more spaces, TAB or CRLF.

Example

 SELECT 4 AS ISCORRECT, F_WORDCOUNT('ABC 123 45678 9123') FROM RDB$DATABASE;

Expected results:

    ISCORRECT  F_WORDCOUNT
 ============ ============
            4            4

Example

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

Expected results:

 ISCORRECT  F_WORDCOUNT
 ========= ============
 <null>          <null>               

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