This commit is contained in:
Ingy döt Net 2013-06-05 21:47:54 +00:00
parent 1f1ad49427
commit 6f050a029e
2496 changed files with 37609 additions and 3031 deletions

View file

@ -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

View file

@ -0,0 +1,9 @@
#lang racket
(define example "alphaBETA")
(string-upcase example)
;"ALPHABETA"
(string-downcase example)
;"alphabeta"
(string-titlecase example)
;"Alphabeta"