1
votes

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

Regards
Cumhur Ata

1
Opinion based questions are not allowed... Try something, let me know what you have tried - Ajay Kulkarni
@Ajay really? Do you know what Cumhur is talking about? - Knut Herrmann
@Ajay I would like to use the same method in SSJS but I could not find the method. I have searched and I couldn't. That is why I asked here. - Cumhur Ata

1 Answers

7
votes

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.