Skip to content

arakanic/string-incrementer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

string-incrementer

This function increments a string, to create a new string.

If the string already ends with a number, the number should increment by 1. If the string does not end with a number. the number 1 should appended to the new string. If the number has leading zeros the amount of digits is considered.

Examples:

foo -> foo1

foobar23 -> foobar24

foo0042 -> foo0043

foo9 -> foo10

foo099 -> foo100

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published