Cumhur Ata
Cumhur Ata

Reputation: 809

Instr method in Javascript XPages

Which method i can use in ServerSide Javascript instead of Instr method in LotusScript

Regards
Cumhur Ata

Upvotes: 1

Views: 403

Answers (1)

Knut Herrmann
Knut Herrmann

Reputation: 30970

Use

yourString.indexOf(yourSubstring)

It returns a value >= 0 if yourSubstring is part of yourString.
It is the position of yourSubstring in yourString starting with 0.
This is different to LotusScript's InStr which starts with 1.

Upvotes: 7

Related Questions