Jump to content

Increment a numerical string: Difference between revisions

(→‎{{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:
1,151

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.