Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

FindOneOf need explaination

Hi,

findoneof( 'my example text string', 'et%s') returns '4'

findoneof( 'my example text string', 'et%s', 3) returns '12'

findoneof( 'my example text string', '¤%&') returns '0'

I am abot to understand when we want to know the n;position of particular character it returns the number of position but what 'et%s','et%s', 3, and  '¤%&' signifies here.

Please explain.

best regards

Shubham

6 Replies
SunilChauhan
Champion
Champion

findoneof( 'my example text string', 'et%s') returns '4'  shows the position 1st occurence of any one from e and t

findoneof( 'my example text string', 'et%s', 3) returns '12' shows the position 3 rd occurence of any one from e and t

findoneof( 'my example text string', '¤%&') returns '0' show there is no match for string hence it is 0

hope this help

Sunil Chauhan
Anonymous
Not applicable
Author

Thanks for your reply Sunil, but I didn't understand that what do you mean by from the position 1st occurence of any one e and t. Does it search from the e and t an then how come it is returning 4 for above example. what the the search character here??

Regards,

Shubham

SunilChauhan
Champion
Champion

position means  first character is at first position ,2nd character is at positition2. an so on.

position    12 3 4

findoneof( 'my example text string', 'et%s') returns '4

                        

shows the position 1st occurence of any one from e and t

e at postion 4

1st occurence meancy first time appearing if t comes first then also we will search position of t

                     4        10 12

findoneof( 'my example text string', 'et%s', 3) here 3 means 3rd occurence

e is at firsst occurence means postion 4 theen again e is at 10 th position i.e 2nd occurence and finally t is at 12 position which is 3rd occuence

i.e final answer is 12

hope this helps

Sunil Chauhan
Anonymous
Not applicable
Author

Thank you Sunil.

Not applicable
Author

need to improve your english. sorry for that advice.

Not applicable
Author

can anybody explain me what is the use of %s.