diff --git a/src/MiniDocs/String.extension.st b/src/MiniDocs/String.extension.st index 021c838..23de2db 100644 --- a/src/MiniDocs/String.extension.st +++ b/src/MiniDocs/String.extension.st @@ -1,5 +1,18 @@ Extension { #name : #String } +{ #category : #'*MiniDocs' } +String >> accentedCharactersCorrection [ + | modified corrections | + corrections := { + 'ó' -> 'ó' . 'ú' -> 'ú' . 'ñ' -> 'ñ' . + 'í' -> 'í' . 'á' -> 'á' . 'é' -> 'é' . '’' -> $' asString} asDictionary. + modified := self copy. + corrections keysAndValuesDo: [ :k :v | + modified := modified copyReplaceAll: k with: v + ]. + ^ modified +] + { #category : #'*MiniDocs' } String >> asDashedLowercase [ "I convert phrases like 'This is a phrase' into 'this-is-a-phrase'."