Sunday, 15 March 2015

Is there an equivalent of find_first_of c++ string method in javascript -


I'm coming from C ++ background and currently working on the node.js server app. I want to know that the find_first_of C ++ string in the Java string is equal to the class method.

Actually I would get a string like var str = "abcd = 100 & amp; efgh = 101 & ijkl = 102 & amp; mnop = 103" . & amp; Sorted words of can be random. So, I wanted to do something like the following:

  str.substr (str.find ("mnop =") + string ("mnop ="). Length, str.find_first_of ("  

Is it in a row like this in a way?

You can find the function useful.

  "Find the string first". Search ("find"); // 7  

its Besides, you can find the question useful too.


No comments:

Post a Comment