Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Question] Any javascript string search functions exposed?

I tried to do a .search and an .indexOf on a string variable (ie, name.search("red")), and both returned errors.  Are there any ways to search a string with the API js?
1375421403
Alex L.
Pro
Sheet Author
Dave C. said: I tried to do a .search and an .indexOf on a string variable (ie, name.search("red")), and both returned errors.  Are there any ways to search a string with the API js? indexOf works fine, if its part of normal JS it will be here except for the browser stuff.
Got it working now, now sure what I was doing earlier that it was broke.