Moving functionality from GrafoscopioUtils.
This commit is contained in:
parent
14160ee4ca
commit
3699111416
@ -1,5 +1,18 @@
|
|||||||
Extension { #name : #String }
|
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' }
|
{ #category : #'*MiniDocs' }
|
||||||
String >> asDashedLowercase [
|
String >> asDashedLowercase [
|
||||||
"I convert phrases like 'This is a phrase' into 'this-is-a-phrase'."
|
"I convert phrases like 'This is a phrase' into 'this-is-a-phrase'."
|
||||||
|
Loading…
Reference in New Issue
Block a user