About 13,800,000 results
Open links in new tab
  1. string - javascript substring - Stack Overflow

    Apr 4, 2013 · alert('helloworld'.substring(5, 2)); The code above is wrong because the first value is the start point to the end point.E.g move from char 5 which is o and go to char 2 which is the l …

  2. What is the difference between substr and substring?

    Sep 19, 2010 · When using substring the second parameter is the first index not to include: var s = "string"; s.substring(1, 3); // would return 'tr' var s = "another example"; s.substring(3, 7); // …

  3. How to check whether a string contains a substring in JavaScript ...

    Nov 24, 2009 · The KMP algorithm searches for a length-m substring in a length-n string in worst-case O(n+m) time, compared to a worst-case of O(n⋅m) for the naive algorithm, so using KMP …

  4. What is the difference between String.slice and String.substring?

    Feb 11, 2010 · The only difference between slice and substring method is of arguments. Both take two arguments e.g. start/from and end/to.

  5. Check whether a cell contains a substring - Stack Overflow

    Sep 4, 2013 · The code below uses the VBA Instr function, which looks for a substring in a string. It returns 0 when the string is not found. Public Function CONTAINS(TextString As String, …

  6. c++ - How to use string.substr () function? - Stack Overflow

    Jan 16, 2017 · Generate substring. Returns a string object with its contents initialized to a substring of the current object. This substring is the character sequence that starts at …

  7. How do I get a substring of a string in Python? - Stack Overflow

    Aug 31, 2016 · @gimel: Actually, [:] on an immutable type doesn't make a copy at all. While mysequence[:] is mostly harmless when mysequence is an immutable type like str, tuple, …

  8. string - Extract substring in Bash - Stack Overflow

    Jan 9, 2009 · Clickbait title. The meaning of substring function is well established and means getting a part by numerical positions. All the other things, (indexOf, regex) are about search. A …

  9. Finding a substring within a list in Python - Stack Overflow

    Dec 6, 2017 · I want to retrieve an element if there's a match for a substring, like abc. Code: sub = 'abc' print any(sub in mystring for mystring in mylist) above prints True if any of the elements in …

  10. sql server - Substring with delimiter in SQL - Stack Overflow

    Aug 27, 2013 · Here I've passed 300 as a second parameter for substring function which means it will pick up to 300 characters after the ',' – Sonam Commented Aug 27, 2013 at 14:48