--- a/HTMLDocGenerator.st Sat Oct 12 15:06:03 2019 +0200
+++ b/HTMLDocGenerator.st Sat Oct 12 15:16:23 2019 +0200
@@ -380,44 +380,8 @@
self camelCaseSeparatedWordsOf:'JisEncoder' do:[:w | Transcript showCR:w]
self camelCaseSeparatedWordsOf:'JISEncode' do:[:w | Transcript showCR:w]
"
- |state newState in out ch part|
-
- in := wordIn readStream.
- out := '' writeStream.
- [in atEnd] whileFalse:[
- ch := in next.
- (ch isDigit or:[ch == $_]) ifFalse:[
- newState := ch isUppercase.
- ].
- (newState ~~ state) ifTrue:[
- newState == true ifTrue:[
- "/ going from lower- to uppercase
- part := out contents.
- part notEmpty ifTrue:[ aBlock value:part ].
- out := '' writeStream.
- out nextPut:ch.
- state := newState.
- ] ifFalse:[
- "/ going upper- to lowercase
- out size <= 1 ifTrue:[
- out nextPut:ch.
- ] ifFalse:[
- |prev|
-
- prev := out contents.
- aBlock value:(prev copyButLast).
- out := '' writeStream.
- out nextPut:prev last.
- out nextPut:ch.
- ].
- state := newState.
- ].
- ] ifFalse:[
- out nextPut:ch.
- ].
- ].
- part := out contents.
- part notEmpty ifTrue:[ aBlock value:part ].
+
+ wordIn camelCaseSeparatedWordsDo:aBlock
!
generateKWIC