update
This commit is contained in:
parent
1f1ad49427
commit
6f050a029e
2496 changed files with 37609 additions and 3031 deletions
|
|
@ -36,18 +36,15 @@ main ldx #sTest Point to the test string
|
|||
jsr toLower convert to lower-case
|
||||
jmp puts print it and return to caller
|
||||
;------------------------------------------------------
|
||||
toUpper pha save A
|
||||
lda #LittleA
|
||||
sta Low set up the flip range
|
||||
lda #LittleZ
|
||||
toUpper ldy #LittleA
|
||||
sty Low set up the flip range
|
||||
ldy #LittleZ
|
||||
bne toLow2 return via toLower's tail
|
||||
;------------------------------------------------------
|
||||
toLower pha save A
|
||||
lda #BigA
|
||||
sta Low set up the flip range
|
||||
lda #BigZ
|
||||
toLow2 sta High
|
||||
pla restore A
|
||||
toLower ldy #BigA
|
||||
sty Low set up the flip range
|
||||
ldy #BigZ
|
||||
toLow2 sty High
|
||||
; return via fall-thru to flip
|
||||
;------------------------------------------------------
|
||||
; Given a NUL-terminated string at A:X, flip the case
|
||||
|
|
|
|||
9
Task/String-case/Racket/string-case.rkt
Normal file
9
Task/String-case/Racket/string-case.rkt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#lang racket
|
||||
(define example "alphaBETA")
|
||||
|
||||
(string-upcase example)
|
||||
;"ALPHABETA"
|
||||
(string-downcase example)
|
||||
;"alphabeta"
|
||||
(string-titlecase example)
|
||||
;"Alphabeta"
|
||||
Loading…
Add table
Add a link
Reference in a new issue