About 677,000 results
Open links in new tab
  1. What is the difference between substr and substring?

    Sep 19, 2010 · substr() accepts a negative starting position as an offset from the end of the string. substring() does not, but slice() does. From substr(): If start is negative, substr() uses it as a …

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

    Jan 16, 2017 · string substr ( size_t pos = 0, size_t n = npos ) const; Generate substring. Returns a string object with its contents initialized to a substring of the current object. This substring is …

  3. Why is String.prototype.substr () deprecated? - Stack Overflow

    Oct 4, 2018 · I much prefer substr() over substring() for most of my work - it would be nice if this was just codified into the language. It would also be nice if MDN indicated that it was …

  4. Newest 'substr' Questions - Stack Overflow

    Sep 27, 2024 · adding member function substr for std::span<T> which imitates the string_view::substr In my code, I would like to create a new class named Span by extending …

  5. SQL Essentials: SUBSTR Function Explained — NetSuite Community

    May 17, 2024 · The SUBSTR function retrieves a portion of the 'string' starting from the 'start_position' and extending for a specified 'length'. For example: Within a NetSuite Saved …

  6. SUBSTR and INSTR SQL Oracle - Stack Overflow

    Dec 31, 2018 · I've started using SUBSTR and INSTR in Oracle but I got confused when I came across this. SELECT PHONE, SUBSTR(PHONE, 1, INSTR(PHONE, '-') -1) FROM …

  7. SELECT Statement with substr in WHERE Clause - Stack Overflow

    Mar 9, 2012 · Use SUBSTR() with MySQL WHERE. 0. how to write sql query using substring. 0.

  8. How to Select a substring in Oracle SQL up to a specific character ...

    SELECT REGEXP_SUBSTR('STRING_EXAMPLE','[^_]+',1,1) from dual is the right answer, as posted by user1717270. If you use INSTR, it will give you the position for a string that …

  9. substring - How substr() of c++ really works? - Stack Overflow

    Oct 20, 2020 · string substr (size_t pos = 0, size_t len = npos) const; Generate substring Returns a newly constructed string object with its value initialized to a copy of a substring of this object. …

  10. c++ string member function substr usage - Stack Overflow

    Sep 7, 2015 · Please tell me if I am understanding the the substr member function correctly? result = result.substr(0, pos) + result.substr(pos + 1); It takes the string from pos, 0 until (but …

Refresh