Tuesday, September 30, 2014 9:10AM

Tip of the Day: Finding Relative Word Position in a Sentence
Product.: R:BASE eXtreme 9.5 (32/64)
Build...: 9.5.4.30930 or higher www.rupdates.com
Keywords: R:BASE Functions

Did you know that you can find the relative word position in a sentence?

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

The RWP function in R:BASE returns the position of a specified word and
occurrence within a TEXT, NOTE or VARCHAR string.

-- Example 01:
   SET VAR vRWP1 INTEGER = +
   (RWP('What is the next major version of R:BASE on horizon','horizon',1))
   Variable vRWP1 will return the value of 10.

-- Example 02:
   SET VAR vRWP2 INTEGER = +
   (RWP('How many years has it been in development','many',1))
   Variable vRWP2 will return the value of 2.

-- Example 03:
   SET VAR vRWP3 INTEGER = (RWP('What will the product name be','name',1))
   Variable vRWP3 will return the value of 5.

-- Example 04:
   SET VAR vRWP4 INTEGER = (RWP('When will the big announcement be','when',1))
   Variable vRWP4 will return the value of 1.

-- Example 05:
   SET VAR vRWP5 INTEGER = +
   (RWP('We have shocked the world and we will do it again!','we',2))
   Variable vRWP5 will return the value of 7.

-- Example 06:
SET VAR vRWP6 INTEGER = (RWP('Remember, nothing is impossible','nothing',1))
   Variable vRWP6 will return the value of 2.

Very Best R:egards,

Razzak.

www.rbase.com
www.facebook.com/rbase
--
31 years of continuous innovation!
16 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--


Reply via email to