Timeline for Why do most language's definition of substring allow substring("abc", 3) => ""
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 10, 2015 at 10:37 | answer | added | gnasher729 | timeline score: 2 | |
Nov 10, 2015 at 4:48 | history | edited | gnat | CC BY-SA 3.0 |
typo corrected
|
Nov 10, 2015 at 3:12 | vote | accept | edaniels | ||
Nov 9, 2015 at 23:44 | vote | accept | edaniels | ||
Nov 10, 2015 at 1:24 | |||||
Nov 9, 2015 at 23:39 | answer | added | ratchet freak | timeline score: 0 | |
Nov 9, 2015 at 23:34 | history | edited | user22815 |
edited tags
|
|
Nov 9, 2015 at 23:31 | answer | added | Kilian Foth | timeline score: 13 | |
Nov 9, 2015 at 23:29 | comment | added | Sjoerd Job Postmus |
As a nice bonus, it allows the identity: str == substr(str, 0, i) + substr(str, i, length(str)) for all values of i .
|
|
Nov 9, 2015 at 23:19 | comment | added | Robert Harvey | You apparently already provided the answer in your question: this is just an unspoken convention among languages that go back to the roots of NULL terminated strings to act as empty strings. | |
Nov 9, 2015 at 23:18 | review | First posts | |||
Nov 9, 2015 at 23:33 | |||||
Nov 9, 2015 at 23:15 | history | asked | edaniels | CC BY-SA 3.0 |