Skip to main content
Bed30321077z973
Inspiring
November 1, 2023
Answered

Extendscript, is there an "includes()" function? I could not find it

  • November 1, 2023
  • 1 reply
  • 453 views

I tried this:


var a = "Test,_,t"
var b = a.includes("7");

So I got this error:

 

a.includes is not a function

 

So is there any other way to verify the if a string is inside another string please?

This topic has been closed for replies.
Correct answer Bruce Bullis

Here's PProPanel using ExtendScript to find an occurrence of a string, within a string:


https://github.com/Adobe-CEP/Samples/blob/e60d6a22ef44d8eb4cca3904c35a0c050576b697/PProPanel/jsx/PPRO/Premiere.jsx#L264

1 reply

Bruce Bullis
Bruce BullisCorrect answer
Legend
November 1, 2023

Here's PProPanel using ExtendScript to find an occurrence of a string, within a string:


https://github.com/Adobe-CEP/Samples/blob/e60d6a22ef44d8eb4cca3904c35a0c050576b697/PProPanel/jsx/PPRO/Premiere.jsx#L264