Increment a numerical string: Difference between revisions
→RPL entry
(→{{header|AppleScript}}: Added AppleScriptObjC solution.) |
|||
Line 2,999:
</syntaxhighlight>
=={{header|RPL}}==
Conversion to/from a real number is the most convenient way to perform the task.
"1234" STR→ 1 + →STR
"99" STR→ 1 + →STR
2: "1235"
1: "100"
=={{header|Ruby}}==
If a string represents a number, the succ method will increment the number:
|