[Question]
  [
This is a code golf version of a similar question [I asked on stack earlier](https://stackoverflow.com/questions/51492374/get-the-point-where-the-replace-occurred-in-a-replace#51493248) but thought it'd be an interesting puzzle.
Given a string of length 10 which represents a base 36 number, increment it by one and return the resulting string.
This means the strings will only contain digits from `0` to `9` and letters from `a` to `z`.
Base 36 works as follows:
The right most digit is incremented, first by using `0` to `9`
> 
> # 0000000000 > 9 iterations > 0000000009
> 
> 
> 
and after that `a` to `z` is used:
> 
> # 000000000a > 25 iterations > 000000000z
> 
> 
> 
If `z` needs to be incremented it loops back to zero and the digit to its left is incremented:
> 
> # 000000010
> 
> 
> 
### Further rules:
* You may use upper case or lower case letters.
* You may **not** drop leading zeros. Both input and output are strings of length 10.
* You do not need to handle `zzzzzzzzzz` as input.
### Test Cases:
```
"0000000000" -> "0000000001"
"0000000009" -> "000000000a"
"000000000z" -> "0000000010"
"123456zzzz" -> "1234570000"
"00codegolf" -> "00codegolg"
```
  
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 13 bytes
```
n36 Ä s36 ù0A
```
[Try it online!](https://tio.run/##y0osKPn/P8/YTOFwi0IxiNpp4Pj/v5KBQXJ@Smp6fk6aEgA "Japt – Try It Online") and [Verify test cases](https://tio.run/##y0osKPn//9C6PGMzhcMtCsUgaqeB4///0UoGcKCkw4XgWaLwqkA8QyNjE1OzKiCAyCXnp6Sm5@ekKcUCAA "Japt – Try It Online")
Takes input as a string
## Explanation
```
n36            converts input to base 36
    Ä           +1
      s36       to base 36 string
          ù0A   left-pad with 0 to length 10
```
[Answer]
# JavaScript (ES6), 45 bytes
*Saved 4 bytes thanks to @O.O.Balance*
```
s=>(parseInt(1+s,36)+1).toString(36).slice(1)
```
[Try it online!](https://tio.run/##dY@xCsMgFEX3fkVwUpoabZqUDuneOV8gRiVFVFQ65OethLaBSu52D4fLe0/2YoH72cWTsZNIckhhuEPHfBAPE2Go2x4dKcLRjtHPRsHcsWPTGJmPkJKaoMStCVYLrK2CEgLyC0CoappqIxQc9uRbIbN9efmXKSlkem4vXb/kfOWVXNfDymWe31dWy235QxRIbw "JavaScript (Node.js) – Try It Online")
[Answer]
# [Haskell](https://www.haskell.org/), 58 bytes
```
d=['0'..'9']
f s=snd(span(<s)$mapM(\_->d++['a'..'z'])d)!!1
```
[Try it online!](https://tio.run/##FcpBCoMwEADAe1@xirAJomhvQtMf@AIrZTFNK8awdHvK493inOdDsr1iVPVuwg7bFgecLwHESfJGmJK5ia124tE8ns3d1/WEdL6Ms/W2KHrdaU3ggL9r@kEFAcru1F@HnEs9lhDpLdoszH8 "Haskell – Try It Online")
A very brute-force strategy: generate all the length-10 base-36 strings in order, and find the one that comes after the input in the list. Take an enormous amount of time on strings far from the start of the list.
---
# [Haskell](https://www.haskell.org/), 60 bytes
```
q '9'='a'
q c=succ c
f(h:t)|any(<'z')t=h:f t|r<-'0'<$t=q h:r
```
[Try it online!](https://tio.run/##FcFLCoMwEADQvacYRBhdCLY7Q@Yww9A00jTkMy4aPHtT@p7n@nqE0HsG3JGQccggVE8RkMHN3uhycfzMFhsuSt440KvYFTe0k1IGb0p/8xGBIJUjKkzgYNz@bve9tbF/xQV@1r5KSj8 "Haskell – Try It Online")
Reads the string left to right until it reaches a character followed by a suffix of all z's, which may be empty. Increments that character, and replaces the z's with 0's.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 10 bytes
Input is in **uppercase**. 
### Code
```
1ì36ö>36B¦
```
### Explanation
```
1ì           # Prepend a 1 to the number
  36ö        # Convert from base 36 to decimal
     >       # Increment by 1
      36B    # Convert from decimal to base 36
         ¦   # Remove the first character
```
Uses the **05AB1E** encoding. [Try it online!](https://tio.run/##MzBNTDJM/f/f8PAaY7PD2@yMzZwOLQNyjYxNTM2igAAA "05AB1E – Try It Online") or [Verify all test cases](https://tio.run/##MzBNTDJM/V9TVvnf8PAaY7PD2@yMzZwOLftfqXR4v8KjtkkKh/cr6fw3gAMuOMsSwYziMjQyNjE1iwICoKizv4uru7@PGwA).
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 7 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
ûæ≥╡►N▀
```
[Run and debug it](https://staxlang.xyz/#p=9691f2b5104edf&i=%220000000000%22+%0A%220000000009%22+%0A%22000000000z%22+%0A%22123456zzzz%22+%0A%2200codegolf%22+&a=1&m=2)
Explanation:
```
|3^|3A|z Full program, implicit input
|3       Convert from base 36
  ^      Increment
   |3    Convert to base 36
     A|z Fill with "0" to length 10
         Implicit output
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 50 48 bytes
An explicit carry flag wasn't necessary after restructuring the loop to end as soon as no carry would happen. The 9->A adjustment is performed during the loop check.
Thanks to ceilingcat for the suggestion.
```
f(char*s){for(s+=9;(*s+=*s-57?1:8)>90;*s--=48);}
```
[Try it online!](https://tio.run/##XVDLTsMwELz7K6xUlew8IIGWNhgHQZ@Hil448TiExGktlaSK3R6o8u1hXacSwhfPzO7OriYLNlnW9mSZ7Q65wA9K57K62ibor1TLcvNfy3fyC7S2INk2rV1FT0VVE@XxmBEXPlcFw9FjdD@mSRwyYAEfjClr2l4uClkKvJq9LF6XJKWYKPkjqgLgtUUuQIqQMcauFkq/f/ITwtgJw8l6OlusV3PHNzx@uzzLn54n09l8sYw7HkY3t4Ph3WgcOw1DSJYaf6eyJAak9Sbz7QoX8JFis6ITFDdrfVcz0Ex3Vh1KzbubTY2CH5TgavBJIjuNseLGy4vYmdkp0xGclcbMmJzYuRIEScgukwXRHKLOD3vIj1JrsIfodUGcvsIejjDHffVROj4E7Pm66ylqIYglDWraXw "C (gcc) – Try It Online")
---
## Original version: 71 57 bytes
This version uses a carry flag to propagate updates: I set it to truthy to begin the increment. The string is modified in-place and only accepts 0-9, A-Z. The tricky part was making sure that 9->A got handled correctly on carries.
Edit: I repurposed the input pointer as the carry flag.
```
f(s){for(char*t=s+9;s;)*t--+=(s=++*t>90)?-43:7*!(*t-58);}
```
[Try it online!](https://tio.run/##XVHJTsMwEL37K0yqSl4SSGhLG4yDoOuhohdOLIfgJK2l4qDY5UCVbw92k0oIn94y82Y0FsFWiKYnldgfshzeaZPJ8nKXgL9SJdX2v5bt5YfVmgJpfCzKColdWhHDNY2ZZpiYIKAcaU4pMUkc4vtgOLgdkwtkndEEs7rpZXkhVQ7X86fl8wqlGCItf/KysPCqRcRCDICLhsTk2ry@8yOA0AvD6WY2X27WC893PH45v5Y/PE5n88VyFXc8jK4Hw9HNeBJ7NQNAKgM/U6mQA2m1FX47glj8jaEb0Qmau7E@McxqrlqUB2V4t7PzsM2zlt3a5iRR2w2h5i6LRuzE2i5XEZyU2vW4q7GTEwRJyM6dBbJXNFV2@EJEY9wGfNk/MAXy@hpSGEEO@/pNeT7RlPqmqymqPEctqUHd/AI "C (gcc) – Try It Online")
[Answer]
# C, ~~82~~ ~~81~~ ~~53~~ 50 bytes
```
f(char*s){for(s+=10;*--s>89;)*s=48;*s+=*s-57?1:8;}
```
Directly modifies the input string; input and output is in upper case. Try it online [here](https://tio.run/##rVJbT4MwGH3nV3RNTFo2EqqbYxI0i7vEuIR33kgtSsIttEvUhd@OwLiJm@Dle2rac@k5LVWeKU1TB9EXO5Y5PjhhjPjYIKouKwq/1RY6lrkx1XQ525W5MpvfkRtNT1LBuDiy3CDaiwko1uw1YlSwJwwOEignit1AOAhecDAGBBgATkDBwXqNcVB3x3XQiIuY@hGqRCtaW7xjgMxHfEI@Aczj7DxtZICcvFk@7NarXKBr2ZJqcu0FRxBmZ4kk@bYboPbFmmqyxL7teSFFhMjcfWfhsW7cUv1U3hBCXk30hsruoVoP/ApqwjQ40sYVb1lK1S/Y77UY6LX8By9rmBdRf@9FLq@ms2srm@@9Cty82/VPc92bq/XW3G36cpW47R@8rGp6cp38Q2e8Ein9AA). Thanks to [Arnauld](https://codegolf.stackexchange.com/users/58563/arnauld) for golfing 24 bytes and to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat) for golfing 3 more bytes.
Ungolfed:
```
f(char *s) { // function taking a string argument
     for(s += 10; *--s > 89; ) // skip to the least significant digit, and step through the string until you hit something other than a 'Z' (90 is the ASCII code for 'Z') ...
         *s = 48; // ... replacing each digit with a zero (48 is the ASCII code for '0')
         *s += // the next digit has to be incremented:
         *s - 57 // if it's not a '9' (ASCII code 57) ...
         ? 1 // ... that is straightforward ...
         : 8; // ... otherwise it has to be replaced with an 'A' (ASCII code 65 = 57 + 8)
 }
```
[Answer]
# [Online Turing Machine Simulator](https://turingmachinesimulator.com/), 745 bytes
```
init:0
accept:2
0,0
0,0,>
0,1
0,1,>
0,2
0,2,>
0,3
0,3,>
0,4
0,4,>
0,5
0,5,>
0,6
0,6,>
0,7
0,7,>
0,8
0,8,>
0,9
0,9,>
0,a
0,a,>
0,b
0,b,>
0,c
0,c,>
0,d
0,d,>
0,e
0,e,>
0,f
0,f,>
0,g
0,g,>
0,h
0,h,>
0,i
0,i,>
0,j
0,j,>
0,k
0,k,>
0,l
0,l,>
0,m
0,m,>
0,n
0,n,>
0,o
0,o,>
0,p
0,p,>
0,q
0,q,>
0,r
0,r,>
0,s
0,s,>
0,t
0,t,>
0,u
0,u,>
0,v
0,v,>
0,w
0,w,>
0,x
0,x,>
0,y
0,y,>
0,z
0,z,>
0,_
1,_,<
1,0
2,1,-
1,1
2,2,-
1,2
2,3,-
1,3
2,4,-
1,4
2,5,-
1,5
2,6,-
1,6
2,7,-
1,7
2,8,-
1,8
2,9,-
1,9
2,a,-
1,a
2,b,-
1,b
2,c,-
1,c
2,d,-
1,d
2,e,-
1,e
2,f,-
1,f
2,g,-
1,g
2,h,-
1,h
2,i,-
1,i
2,j,-
1,j
2,k,-
1,k
2,l,-
1,l
2,m,-
1,m
2,n,-
1,n
2,o,-
1,o
2,p,-
1,p
2,q,-
1,q
2,r,-
1,r
2,s,-
1,s
2,t,-
1,t
2,u,-
1,u
2,v,-
1,v
2,w,-
1,w
2,x,-
1,x
2,y,-
1,y
2,z,-
1,z
1,0,<
```
[Online interpreter](http://turingmachinesimulator.com/shared/dymdlyvxoj)
[Answer]
# [6502 (NMOS\*) machine code](https://en.wikibooks.org/wiki/6502_Assembly) routine, 26 bytes
```
A0 09 F3 FB B1 FB C9 5B 90 07 A9 30 91 FB 88 10 F1 C9 3A D0 04 A9 41 91 FB 60
```
\*) uses an "illegal" opcode `ISB`/`0xF3`, works on all original NMOS 6502 chips, not on later CMOS variants.
Expects a pointer to a 10-character string in `$fb`/`$fc` which is expected to be a base-36 number. Increments this number in-place.
Doesn't do anything sensible on invalid input (like e.g. a shorter string) -- handles `ZZZZZZZZZZ` "correctly" by accident ;)
### Commented disassembly
```
; function to increment base 36 number as 10 character string
;
; input:
;   $fb/$fc: address of string to increment
; clobbers:
;   A, Y
 .inc36:
A0 09       LDY #$09            ; start at last character
 .loop:
F3 FB       ISB ($FB),Y         ; increment character ("illegal" opcode)
B1 FB       LDA ($FB),Y         ; load incremented character
C9 5B       CMP #$5B            ; > 'z' ?
90 07       BCC .checkgap       ; no, check for gap between numbers and letters
A9 30       LDA #$30            ; load '0'
91 FB       STA ($FB),Y         ; and store in string
88          DEY                 ; previous position
10 F1       BPL .loop           ; and loop
 .checkgap:
C9 3A       CMP #$3A            ; == '9' + 1 ?
D0 04       BNE .done           ; done if not
A9 41       LDA #$41            ; load 'a'
91 FB       STA ($FB),Y         ; and store in string
 .done:
60          RTS
```
---
### Example C64 assembler program using the routine:
**[Online demo](https://vice.janicek.co/c64/#%7B%22controlPort2%22:%22joystick%22,%22primaryControlPort%22:2,%22keys%22:%7B%22SPACE%22:%22%22,%22RETURN%22:%22%22,%22F1%22:%22%22,%22F3%22:%22%22,%22F5%22:%22%22,%22F7%22:%22%22%7D,%22files%22:%7B%22inc36.prg%22:%22data:;base64,AQgLCOIHnjIwNjEAAACpvKAIIB6rqb+gCKILIC8Iqb+F+6kIhfwgogipv6AITB6ryob7hfyE/aAAhMyE/iBC8fD7hQIpf8kgsA7JDfAQyRTQ66X+8OfQBqX+xfvw33ik07HRKX+R0aUCIBbnps/wCqTTsdEJgJHRpQJYyRTwIMkN8Amk/pH8yIT+0LGpAKT+kfx4pNOx0Sl/kdHmzFhgxv6wmqAJ8/ux+8lbkAepMJH7iBDxyTrQBKlBkftgPiAA%22%7D,%22vice%22:%7B%22-autostart%22:%22inc36.prg%22%7D%7D)**
[![screenshot](https://i.stack.imgur.com/GQmF0.png)](https://i.stack.imgur.com/GQmF0.png)
**Code in [ca65](http://cc65.github.io/doc/ca65.html) syntax:**
```
.import inc36   ; link with routine above
.segment "BHDR" ; BASIC header
                .word   $0801           ; load address
                .word   $080b           ; pointer next BASIC line
                .word   2018            ; line number
                .byte   $9e             ; BASIC token "SYS"
                .byte   "2061",$0,$0,$0 ; 2061 ($080d) and terminating 0 bytes
.bss
b36str:         .res    11
.data
prompt:         .byte   "> ", $0
.code
                lda     #<prompt        ; display prompt
                ldy     #>prompt
                jsr     $ab1e
                lda     #<b36str        ; read string into buffer
                ldy     #>b36str
                ldx     #$b
                jsr     readline
                lda     #<b36str        ; address of array to $fb/fc
                sta     $fb
                lda     #>b36str
                sta     $fc
                jsr     inc36           ; call incrementing function
                lda     #<b36str        ; output result
                ldy     #>b36str
                jmp     $ab1e
; read a line of input from keyboard, terminate it with 0
; expects pointer to input buffer in A/Y, buffer length in X
.proc readline
                dex
                stx     $fb
                sta     $fc
                sty     $fd
                ldy     #$0
                sty     $cc             ; enable cursor blinking
                sty     $fe             ; temporary for loop variable
getkey:         jsr     $f142           ; get character from keyboard
                beq     getkey
                sta     $2              ; save to temporary
                and     #$7f
                cmp     #$20            ; check for control character
                bcs     checkout        ; no -> check buffer size
                cmp     #$d             ; was it enter/return?
                beq     prepout         ; -> normal flow
                cmp     #$14            ; was it backspace/delete?
                bne     getkey          ; if not, get next char
                lda     $fe             ; check current index
                beq     getkey          ; zero -> backspace not possible
                bne     prepout         ; skip checking buffer size for bs
checkout:       lda     $fe             ; buffer index
                cmp     $fb             ; check against buffer size
                beq     getkey          ; if it would overflow, loop again
prepout:        sei                     ; no interrupts
                ldy     $d3             ; get current screen column
                lda     ($d1),y         ; and clear 
                and     #$7f            ;   cursor in
                sta     ($d1),y         ;   current row
output:         lda     $2              ; load character
                jsr     $e716           ;   and output
                ldx     $cf             ; check cursor phase
                beq     store           ; invisible -> to store
                ldy     $d3             ; get current screen column
                lda     ($d1),y         ; and show
                ora     #$80            ;   cursor in
                sta     ($d1),y         ;   current row
                lda     $2              ; load character
store:          cli                     ; enable interrupts
                cmp     #$14            ; was it backspace/delete?
                beq     backspace       ; to backspace handling code
                cmp     #$d             ; was it enter/return?
                beq     done            ; then we're done.
                ldy     $fe             ; load buffer index
                sta     ($fc),y         ; store character in buffer
                iny                     ; advance buffer index
                sty     $fe
                bne     getkey          ; not zero -> ok
done:           lda     #$0             ; terminate string in buffer with zero
                ldy     $fe             ; get buffer index
                sta     ($fc),y         ; store terminator in buffer
                sei                     ; no interrupts
                ldy     $d3             ; get current screen column
                lda     ($d1),y         ; and clear 
                and     #$7f            ;   cursor in
                sta     ($d1),y         ;   current row
                inc     $cc             ; disable cursor blinking
                cli                     ; enable interrupts
                rts                     ; return
backspace:      dec     $fe             ; decrement buffer index
                bcs     getkey          ; and get next key
.endproc
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), ~~34 32~~ 30 bytes
*Thanks to nwellnhof for -2 bytes through the use of the `o` operator to combine functions*
```
{S/.//}o{base :36(1~$_)+1: 36}
```
[Try it online!](https://tio.run/##XY1NC4JAEIbv@yuGRUrR0s0yUpSkzIvgoehgRBgoCFbS2iHE/rqtmn3NZebZZ96dLLqmWnW6Qy82q2ItD2W5vBTHkEagqxpPHtxBEIkOqlbWW/M8ojkFE9LkHFHLGtIsTXK@DwML@gJjZ2t7BkI3lt@wVTZmaXgGsQ0yjC/X7pcCASQUYp477JS9IAHrZC8BbhhMq33ABiorrLwL18c@TDD6wOxP2t8y@JVEYZKM1PFEC1i1suFpc6ZOLvyl4/reqku@2MVP "Perl 6 – Try It Online")
Function that converts the argument to base 36, adds 1, converts back and then formats it. Now uses the same tactic as [Adnan's answer](https://codegolf.stackexchange.com/a/169450/76162) to preserve the leading zeroes. 
[Answer]
# [MATL](https://github.com/lmendo/MATL), 12 bytes
```
36ZAQ5M10&YA
```
[Try it online!](https://tio.run/##y00syfmf8N/YLMox0NTX0EAt0vG/S8h/dYPk/JTU9PyctCp1LnUDOEDmWCJzQMoMjYxNTM2qgAAsAzNBHQA "MATL – Try It Online")
```
           % Implicit input
36ZA       % convert from base 36 to decimal
Q          % increment by 1
5M         % bring the 36 back on stack (done this way to avoid needing space separator after this)
10         % = minimum length of output string
&YA        % convert back to base 36 with those arguments
           % Implicit output
```
[Answer]
# [Haskell](https://www.haskell.org/), 63 bytes
```
r.f.r
f('9':r)='a':r
f('z':r)='0':f r
f(c:r)=succ c:r
r=reverse
```
[Try it online!](https://tio.run/##y0gszk7NyfmfrmCrEPO/SC9Nr4grTUPdUt2qSNNWPRFIgbhVEK6BulWaAkggGcQtLk1OVgCyuIpsi1LLUouKU//nJmbmAQ3KTSzwVdAoKC0JLinyyVPQU0jXVIhWMoADJR0ExxKZUwXkGBoZm5iaVQEBWCY5PyU1PT8nTSn2/7/ktJzE9OL/uhHOAQEA "Haskell – Try It Online") Reverses the string and checks the first character:
* A `9` is replaced by an `a`.
* A `z` is replaced by a `0` and recursively the next character is checked.
* All other characters are incremented using `succ`, the successor function which can be used on Chars because they are an instance of the [Enum class](http://hackage.haskell.org/package/base-4.11.1.0/docs/Prelude.html#t:Enum).
Finally the resulting string is reversed again.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 14 bytes
```
×0⁹←⮌⍘⊕⍘Ｓ³⁶¦³⁶
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRCMkMze1WEPJQElHwVJT05oLImrlk5pWoqMQlFqWWlScquGUWJwaXAKUSdfwzEsuSs1NzStJTUEVLigtgbI1dRSMzTShpKb1//8GBsn5Kanp@Tlp/3XLcgA "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
×0⁹
```
Print 9 `0`s. This serves to pad the result.
```
←⮌⍘⊕⍘Ｓ³⁶¦³⁶
```
Convert the input from base 36, incremented it, then convert back to base 36. Then, reverse the result and print it leftwards.
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 12 bytes
```
T`zo`dl`.z*$
```
[Try it online!](https://tio.run/##K0otycxL/K@q4Z7wPyShKj8hJSdBr0pL5f9/AzjggrMsEcwqLkMjYxNTsyogAIom56ekpufnpAEA "Retina 0.8.2 – Try It Online") Explanation: The `dl` part of the substitution destination expands to `0-9a-z` while the `o` copies that to the source, resulting in `z0-9a-z` (although the second `z` gets ignored as it can never match). This increments the matched digits. The `.z*$` part of the pattern matches the last non-`z` digit plus all trailing `z`s, thus handling the carry from their increment to `0`.
[Answer]
# Java 8, ~~90~~ ~~76~~ 56 bytes
```
s->Long.toString(Long.valueOf(1+s,36)+1,36).substring(1)
```
Accepts both upper-case and lower-case letters for input. Output is always in lower case.
Thanks to [Okx](https://codegolf.stackexchange.com/users/26600/okx) for golfing 18 bytes.
Try it online [here](https://tio.run/##nVLfT4MwEH73r6g8tRmQ1emMLpJo1MQ4swcflz10pRBmB0gL6hb@diwtP92bl0Dbu/u@73q9HSmIs/M/qjTf8ogCyokQ4I1EMTieAWVRLFkWEMrAAxFsNm/ctb3LLIpDlUEztmexhJ0jzSVa6LxS/xtyIYlUS5FEPtgriQaw3gCShQINqButrVnuQCUcb5nEoSsTg4H6VBCes1UA8UTYszma4PrvinwrTBJGVcu4@FO2EpVMSKoUhBKI2VcfOFrTzhyv22LLBn3kZhAho8ihj@BpHcEXs8ur@UGZ4@n9dR0zGJr4LEx4UGOafWiVfbVBkrV9besFt33pw6aNLidSHkl1sTbT1Q5oOZ6FFiNInQFNp20DW0837Q5vBtnl8EmzqCCSjd5UM42ezgbDmehO7DtlVDIfnU4ToTInXBVuCNx@uoZjpSczgC2Pyz4VSEADRidN@RGS7d0kl64qO5Y8NmRgAiz1YaVWr4107YSrVzTsUwkYV43/F21bpHafn0o9378snx7Hck2jy@oX).
Ungolfed:
```
s -> // lambda taking a String argument and returning a String
    Long.toString(Long.valueOf(1+s,36)+1,36) // prefix input with '1' to ensure leading zeros, convert to Long using base 36, increment, then convert back to String in base 36
    .substring(1) // remove the leading '1'
```
[Answer]
# JavaScript (ES6), 89 bytes
This one is not nearly as byte-efficient as [the other JavaScript entry](https://codegolf.stackexchange.com/a/169453/41061), but I made this without noticing this rule:
> 
> Given a string **of length 10**
> 
> 
> 
So this isn't a serious entry - just for fun! It works with strings of general length, such as `0abc`, and prepends a `1` when the first digit is `z`, e.g. `zzz` -> `1000`. Input must be lowercase.
```
s=>(l=s[s.length-1],r=s.slice(0,-1),l=='z'?f(r||'0')+0:r+(parseInt(l,36)+1).toString(36))
```
## Explanation
The expression `(A, B, C)` actually means "do A, then do B, then return C", which I make use of to declare some variables I reuse in the code. `s` stands for "string", `l` means "last", `r` means "rest".
```
/*1*/ s=>(
/*2*/   l=s[s.length-1],
/*3*/   r=s.slice(0,-1),
/*4*/   l=='z'
/*5*/     ? f(r||'0')+0
/*6*/     : r+(parseInt(l,36)+1).toString(36))
```
This is a recursive function. For a typical string like `aza`, it will just increment the last character (see line 6) - `azb`. But for a string that ends with `z`, like `h0gz`, it will run itself on everything up to the last character (the `z`) and substitute a `0` in place of it (see line 5) - `f(h0gz)` = `f(h0g) + 0` = `h0h0`.
The `||'0'` in line 5 is so that the function works when it's called on a 1-length string (i.e. the string `'z'`). Without it, `f('')` is called (since `'z'.slice(0, -1)` is `''`), which has undefined behavior (literally - try it yourself), and that's no good. The expected result of `f('z')` is `'10'`, which is what we get from `f('0') + 0`, so we use `||'0'`. (`||'0'` is particularly useful because it doesn't get in the way of the *usual* case - `r` being at least 1-length (`s` at least 2-length) - because strings are falsey only when they are 0-length.)
The method for incrementing a string is the same as used in the other JS entry: convert the base-36 "number" into an actual number, add 1, then convert it back to base-36. We don't need to worry about the `1` from incrementing 'z' (`'z'` -> `'10'`), since we never actually increment 'z' (see line 4 and 6: the last character is only incremented if it is not 'z').
Also, we never risk discarding leading zeroes, because we don't ever actually manipulate more than a single character at a time - only ever the last character in the string. The rest of the characters are cleanly sliced off as you slice any string and prepended afterwords.
[Answer]
# [Ruby](https://www.ruby-lang.org/), 40 bytes
```
->s{(s.to_i(36)+1).to_s(36).rjust 10,?0}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1664WqNYryQ/PlPD2ExT21ATxC4GsfWKskqLSxQMDXTsDWr/FyikRSsZwIFSrIKtrQJCwFCJC1WFJbqKRHQVVWgqDA2gKgyNjE1MzaqAAKoCLGAOthZmRnJ@Smp6fk4a3AyoQLrSfwA "Ruby – Try It Online")
1. Convert the string to an integer interpreting it as base 36
2. Add 1
3. Convert back to base 36 string
4. Left pad with `0`s
`"zzzzzzzzzz"` returns an 11-long string
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), 109 bytes
```
,[>>,]<+[++++<[<--->>-<-]-[<->>+<---]<[[-]>-------<]+>>[[+<+>]<<+[>+<------]>>]-[<+>-----]<++++<]<[<<]>>[.>>]
```
[Try it online!](https://tio.run/##JYxLCoBADEMP1KngdxVyEEsXKggiuBA8f@0wb1WavOzvdj3nd9wRxcjiEJMEBlUlFeqaNyn14TBTpzbgQpoJhI4UW6fWyGpJK@ZmXUwXyMS6TCP6YZzmZU1@ "brainfuck – Try It Online")
[Answer]
# [Apl (Dyalog Unicode)](https://dyalog.com), 30 28 24 bytes
Thanks to ngn for the hint to save some bytes.
```
(f⍣¯1)1+f←36⊥1,(⎕D,⎕A)⍳⊢
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///qG@qp/@jtgkG/zOBpEbao97Fh9YbahpqpwG5xmaPupYa6mgAFbnoAAlHzUe9mx91Lfr/P1PdwMDZ38XV3d/HTZ0rU93QyNjE1CwKCEA8AzhA4UHkomAAxINzItUB)
* Requires ⎕IO of 0
* Uses upper case
[Answer]
# PHP, ~~69~~ 64 bytes
**lame version**:
```
printf("%010s",base_convert(1+base_convert($argn,36,10),10,36));
```
Run as pipe with `-R`. Input case insensitive, output lowercase.
**first approach, 69 bytes:**
```
<?=str_pad(base_convert(1+base_convert($argn,36,10),10,36),10,'0',0);
```
Run as pipe with `-F`
**looping version, also 69 bytes**:
```
for($n=$argn;~$c=$n[$i-=1];)$f||$f=$n[$i]=$c!=9?$c>Y?0:++$c:A;echo$n;
```
* PHP 7.1 only: older PHP does not understand negative string indexes,  
younger PHP will yield warnings for undefined constants.
* requires uppercase input. Replace `Y` and `A` with lowercase letters for lowercase input.
Run as pipe with `-nR`
... or [try them online](http://sandbox.onlinephpfunctions.com/code/8053aa5fa35b580f326021fc0041ef32176f8fb8).
[Answer]
# [Python 2](https://docs.python.org/2/), 88 bytes
```
def f(s):L,R=s[:-1],s[-1:];return s and[[L+chr(ord(R)+1),f(L)+'0'][R>'y'],L+'a'][R=='9']
```
[Try it online!](https://tio.run/##Vc69CoMwHATwuX2K4PJPSARjP8AUfYJMriGDNKYKJZHEDvryqVJo6W0/joOblnnwrkzJ9BZZHImQrK2jEjnXLKqcC30L/fwKDkXUOaOUpPchYB8MbgnlhFksCYUCtGobWEAzSaHbVddQgU7Wh206OqSy4puMoZ@qP627eHk6X67rlk9396Z/@KfNtDgepjC6GUUGeQNs/5zSGw "Python 2 – Try It Online")
Increments the string "by hand".
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 39 bytes
```
IntegerString[#~FromDigits~36+1,36,10]&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n6Zg@98zryQ1PbUouKQoMy89WrnOrSg/1yUzPbOkuM7YTNtQx9hMx9AgVu1/AFC@JFpZQddOIS1aOTZWQU1B30GhWskADpR0FBA8SxReFYhnaGRsYmpWBQQQueT8lNT0/Jw0pdr/AA "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# [Clean](https://github.com/Ourous/curated-clean-linux), ~~89~~ 84 bytes
```
import StdEnv
@['9':t]=['a':t]
@['z':t]=['0': @t]
@[c:t]=[inc c:t]
r=reverse
```
# 
```
r o@o r
```
[Try it online!](https://tio.run/##RcwxC8IwEAXgPb/iwCGT0NVCIIMOglvH0uFIUwkkF7leC/bHG00VfMt7fMNz0SOVlMclekgYqIT0yCzQyXihVdlen3Qrg@k11q6w/aDRLdid3A6BHNSl2LBfPc@@dIIs6gDTQk5CJjDAkG0GVuaPn6tm@0YP5eWmiPe5HK@3cn4SpuDmNw "Clean – Try It Online")
A shorter solution thanks to [Laikoni](https://codegolf.stackexchange.com/users/56433/laikoni).
# [Clean](https://github.com/Ourous/curated-clean-linux), 115 bytes
I love it when I get to use `limit(iterate...`
```
import StdEnv
@'9'='a'
@c=inc c
?[h,'{':t]=[@h,'0': ?t]
?[h:t]=[h: ?t]
?e=e
$l=limit(iterate?(init l++[@(last l)]))
```
[Try it online!](https://tio.run/##LY29CsIwFEb3PEUG4bZUoauF0Aw6CG4dQ4ZLGu2FJJX2Kqjvbqw/33S@sxwXPKYcx/4avIxIKVO8jBPLjvt9ugkNW1CAILRTlJx0ojXDGp7QsFVGL1hDI1u2H/91w/965cUqqECRuCD2E7JvC0rEMlSV0UXAecHSlmXuGJekkitpoK4fv4HNL3cKeJ7z5nDMu3vCSG5@Aw "Clean – Try It Online")
Produces the answer without converting bases using list matching.
* `? :: [Char] -> [Char]` performs forward carrying.
* `@ :: Char -> Char` increments by one, accounting for the gap between `'9'` and `'z'`.
* `$ :: [Char] -> [Char]` increments the last character and applies `?` until the value stabilizes.
[Answer]
# [R](https://www.r-project.org/), ~~152~~ 123 bytes
```
function(x)f(utf8ToInt(x),10)
f=function(x,n,y=x[n]){x[n]=y+(y==57)*39+(y==122)*(-75)+1
"if"(y==122,f(x,n-1),intToUtf8(x))}
```
[Try it online!](https://tio.run/##ZY0xD4IwEIV3fkVTlx60CQURSay7O07GwaAlJKZNTEkA42@vBQlguOFy9@679162RAeGrKxVYSqtSAOS1Ebuc31Sxm2Uh@BJMd@poq1oLuoK776LNiCtEEkKfpwNI48i8AlLEwi4hyuJR5HK/plxoJUyuT67EOcPH1sSHE6FAW0QO6JZ4thbEtmauP0T3Yrg4UDwKN4mu87VRAxSOgT/PAp9f5T6KRceo1Ri@wU "R – Try It Online")
A completely different approach. Get the ASCII code points and recursively "increment" the right-most code point (making `0` (57) jump to to `a` (97) and `z` (122) go back to `0` (48)) until you run out of `z`s. Convert back to string.
### Old version
```
function(s,w=gsub("(z)(?=\\1*$)","0",s,,T),x=regexpr(".0*$",w)[1],y=substr(w,x,x),z=chartr("0-9a-z","1-9a-z0",y))sub(p(y,"(0*$)"),p(z,"\\1"),w)
p=paste0
```
[Try it online!](https://tio.run/##ZY3BboMwDIbvPEXkcbArMyXb2qrSsr1Eb20PjAGtVJUoAQF5eZayiTLhk/3r8/fboRDviRiK5pbVl@qGjltduuYLAT3hpz4e1SomYJDAjnlP3Gmbl3lnLMKzXMXALR3UiXsdvlxtseWOO2Kvs3Nqww0y2aWJDwo1LkHUE90rDPYMKO9@YoOeIbSFtaXIaJO6OpdDEf6nARJPIvkQj0hBNCd2SyL9T/gFoeRIqJfXt/XGh5mIMdqOxb@OrPrOy@pazBx/UQnDDw "R – Try It Online")
This is all text manipulation, which is does not go hand-in-hand with R code golfing.
Replace all `z` at end of strings with `0`. Find location of last element before the newly minted trailing `0`s. Find the next base 36 digit. Make the change. Be glad to have barely beaten the Online Turing Machine Simulator solution.
[Answer]
# [Zsh](https://www.zsh.org/), ~~41~~ 36 bytes
```
echo ${(l:10::0:)$(([##36]36#$1+1))}
```
[Try it online!](https://tio.run/##qyrO@J@moalQ/T81OSNfQaVaI8fK0MDKysBKU0VDI1pZ2dgs1thMWcVQ21BTs/Z/LVdRamKKQgVXmoJKxX8Dg@T8lNT0/Jw0AA "Zsh – Try It Online")
[Answer]
# [Starry](https://esolangs.org/wiki/Starry), 325 bytes
```
     + , , , , , , , , , ,     +      +   +   +`* +          + +* + +**      + * +* * '    +           + +* +* +* +*      +* `     +  + +                + +  *       +* *  '    +      +*           + +* +* +*  `   +   +           + +* +  *  **   +  + +'    +    +   ` +           + +* +  *    * .           + +* +  *   * +   '
```
[Try it online!](https://tio.run/##dZDbDoAgCIZfhTs3aK1HsnW6aXOzbnp6ShhmTT2g/MCH8zjHGC9mSIOgq0yN5EO2R5NUJhSD5mNSEFxRW2TaUgnBG5w@yVYBgJBzn2tJNcqfLkyqdhecPFU7vrhkfKsimb4R0t9wzMMwhXnZwr7e "Starry – Try It Online")
# Explanation:
```
Put-a-zero-at-the-base-of-the-stack
|     +
Read-10-digits
| , , , , , , , , , ,
Initialise-next-stack
|     +
Initialise-carry-bit
|      +
|   +   +
Do
|`
    Top-of-stack:-[output-stack]-[carry-bit]-[next-value]
    Add-Carry-bit-to-digit
    |*
    
    Compare-with-58-("9"=57)
    | +
    5-double-triple-sub1-double
    |          + +* + +**      + * +*
    Take-difference
    | *
    If-one-above-"9"
    | '
        set-to-"a"=97=6-double-double-double-double-add1
        |    +
        |           + +* +* +* +*      +*
    | `
    
    Initialise-next-carry-bit
    |     +
    |  +
    
    Compare-with-123-("z"=122)
    | +
    11-squared-add2
    |                + +  *       +*
    Take-difference
    | *
    If-one-above-"z"
    |  '
        Delete-current-value
        |    +
        set-carry-bit
        |      +*
        Set-to-"0"=48
        |           + +* +* +*
    |  `
    
    Push-value-to-stack
    |   +   +
    |           + +* +  *
    |  **
    
    |   +  +
While-next-value-is-not-null
| +'
Pop-carry-bit-and-null-string-terminator
|    +    +
Do
|   `
    Get-top-value
    | +
    |           + +* +  *
    |    *
    
    Print-it
    | .
    
    Pop-the-value-off-the-stack
    |           + +* +  *
    |   *
While-stack-is-not-null
| +   '
```
[Answer]
# [Python 3.6+ and gmpy2](https://docs.python.org/3/), 62 bytes
```
from gmpy2 import*;f=lambda s:f'{digits(mpz(s,36)+1,36):0>10}'
```
[Try it online!](https://tio.run/##VY3BCsIwEAXP@hVLL2m0QttowYj9EfFQrdsGmmxIcmnFb48tguIcHgxzeHYMPRkRIzrS0Gk7lqC0JRc2JzwPjb61DXiJ7NmqTgWfajulPhMV3xbLyrwu8heLSA48KAOXJP@SZPCz459NixWl2B@qaebT7tQ@Ohowucr1yjplAsxfbFezDFPPeYxv "Python 3 – Try It Online")
(Note that gmpy2 isn't part of Python standard library and requires separated installation)
[Answer]
# [Pyke](https://github.com/muddyfish/PYKE), 11 bytes
```
? b!!R+bhbt
```
[Try it here!](https://pyke.catbus.co.uk/?code=%3F+b%21%21R%2Bbhbt&input=0zzzzzzzzz%0A&warnings=1&hex=0)
```
? b         - Change default base of `base` command to 36 
            -  This is kind of clever because it modifies the list of characters 
            -  the command uses to exactly the same as it was originally, whilst
            -  forcing an overwrite from the default settings of 10. 
            -  The default setup works for base 36, you just have to specify it
            -  time when using the command.
            -  Literally `b.contents = modify(b.contents, func=lambda: noop)`
   !!       - The previous command returns `0123456789abcdefghijklmnopqrstuvwxyz`
            -  So we convert it into a 1 with (not not ^) for the following command:
     R+     -     "1"+input
       b    -    base(^, 36)
        h   -   ^ + 1
         b  -  base(^, 36)
          t - ^[1:]
```
Could be 2 bytes shorter with the following language change: If hex mode is used, change all base\_36 and base\_10 usages to base\_92 (which isn't really base 92 in that context anyway)
[Answer]
# [sed](https://www.gnu.org/software/sed/), 94 bytes
```
s/$/#:0123456789abcdefghijklmnopqrstuvwxyz#0/
:l
s/\(.\)#\(.*:.*\1\)\(#*.\)/\3\2\3/
tl
s/:.*//
```
[Try it online!](https://tio.run/##K05N0U3PK/3/v1hfRV/ZysDQyNjE1MzcwjIxKTklNS09IzMrOyc3L7@gsKi4pLSsvKKyStlAn8sqh6tYP0ZDL0ZTGUhqWelpxRjGaMZoKGsBhfRjjGOMYoz1uUpAqoBy@vr//xvAARecZYlgVnFBbK4CAqBocn5Kanp@ThoA "sed – Try It Online")
Sed suffers a lot for having to change the characters by lookup.
[Answer]
# Powershell, ~~79~~ ~~78~~ 82 bytes
*+4 bytes: `z` and `9` inside an argument string fixed*
```
$i=1
"$args"[9..0]|%{$r=([char]($i+$_)+'0a')[2*($i*$_-eq57)+($i*=$_-eq'z')]+$r};$r
```
Less golfed test script:
```
$f = {
$i=1                    # increment = 1
"$args"[9..0]|%{        # for chars in positions 0..9 in the argument string (in reverse order)
    $c=[char]($i+$_)    # Important! A Powershell calculates from left to right
                        # Therefore the subexpression ($i+$_) gets a value before the subexpression ($i=$_-eq122)
    $j=2*($i*$_-eq57)+  # j = 2 if the current char is '9' and previous i is 1
        ($i*=$_-eq122)  # j = 1 if the current char is 'z' and previous i is 1
                        # j = 0 othewise
                        # side effect is: i = 1 if the current char is 'z' and previous i is 1, i = 0 othewise
    $c=($c+'0a')[$j]    # get element with index j from the array
    $r=$c+$r            # accumulate the result string
}
$r                      # push the result to a pipe
}
@(
    ,("09fizzbuzz" , "09fizzbv00")
    ,("0000000000" , "0000000001")
    ,("0000000009" , "000000000a")
    ,("000000000z" , "0000000010")
    ,("123456zzzz" , "1234570000")
    ,("00codegolf" , "00codegolg")
) | % {
    $s,$expected = $_
    $result = &$f $s
    "$($result-eq$expected): $result"
}
```
Output:
```
True: 09fizzBv00
True: 0000000001
True: 000000000a
True: 0000000010
True: 1234570000
True: 00codegolg
```
]