27 lines
671 B
Smalltalk
27 lines
671 B
Smalltalk
Extension { #name : #String }
|
|
|
|
{ #category : #'*MiniDocs' }
|
|
String >> asDashedLowercase [
|
|
"I convert phrases like 'This is a phrase' into 'this-is-a-phrase'."
|
|
|
|
^ '-' join: (self substrings collect: [:each | each asLowercase ])
|
|
]
|
|
|
|
{ #category : #'*MiniDocs' }
|
|
String >> romanizeAccents [
|
|
| modified corrections |
|
|
corrections := {
|
|
'ó' -> 'o' . 'ú' -> 'u' . 'ñ' -> 'n' .
|
|
'í' -> 'i' . 'á' -> 'a' . 'é' -> 'e' } asDictionary.
|
|
modified := self copy.
|
|
corrections keysAndValuesDo: [ :k :v |
|
|
modified := modified copyReplaceAll: k with: v
|
|
].
|
|
^ modified
|
|
]
|
|
|
|
{ #category : #'*MiniDocs' }
|
|
String >> withoutXMLTagDelimiters [
|
|
^ self copyWithoutAll: #($< $>)
|
|
]
|