About 12,900,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 use substring function in c? - Stack Overflow

    May 10, 2012 · If C did have a substring function, its declaration might look something like this: char *substr(const char *instring, size_t pos, size_t len); This would take the input string …

  4. 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, …

  5. Check substring exists in a string in C - Stack Overflow

    Jun 2, 2017 · Assign a pointer to the main string and the substring, increment substring pointer when matching, stop looping when substring pointer is equal to substring length. read_line() - …

  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. c# - substring with linq? - Stack Overflow

    Jun 27, 2013 · subString = word.Substring(0,Math.Min(5,word.Length)); The latter code is more human-readable and lightweight, though there is definitely a slight coolness factor to using …

  10. 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 …

Refresh