Nashorn - includes/contains

Joshua Brodie josbrodie at
Thu May 16 14:57:13 EDT 2019

I'm a novice with Nashorn (+ Javascript, if it is similar).

Is there a straightforward way to find out if a string contains a substring

Say, 'thisString' contains 'foobar'?

if (thisString.includes("foobar"))


      addToString.getValues().add("foobar Included");

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list