Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Function Index > R

RWP

Scroll Prev Top Next More

(RWP('string','actualword',occurrence))

 

Returns the position of a specified word and occurrence in a TEXT, NOTE or VARCHAR string. RWP = Relative Word Position

 

The resulting variable returns an integer value. If the word is not found a NULL is returned.

 

Example 01:

SET VAR vRWP INTEGER = (RWP('Imagine The Possibilities','Possibilities',1))

Variable vRWP will return the value of 3.

 

Example 02:

SET VAR vRWP2 INTEGER = (RWP('We have shocked the world and we will do it again!','we',2))

Variable vRWP2 will return the value of 7.

 

Example 03:

SET VAR vRWP3 INTEGER = (RWP('Keep in mind that nothing is impossible','nothing',1))

Variable vRWP3 will return the value of 5.