More String utililities, used for web stuff.
This commit is contained in:
parent
ce7b7c5810
commit
1c54938532
@ -2,11 +2,18 @@ Extension { #name : #String }
|
||||
|
||||
{ #category : #'*Grafoscopio-Utils' }
|
||||
String >> asCapitalizedPhrase [
|
||||
"I convert phrases like 'THIS IS A PHASE' into 'This is a Phrase'."
|
||||
"I convert phrases like 'THIS IS A PHRASE' into 'This is a Phrase'."
|
||||
|
||||
^ Character space join: (self substrings collect: [:each | each asLowercase capitalized ])
|
||||
]
|
||||
|
||||
{ #category : #'*Grafoscopio-Utils' }
|
||||
String >> asDashedLowercase [
|
||||
"I convert phrases like 'This is a phrase' into 'this-is-a-phrase'."
|
||||
|
||||
^ '-' join: (self substrings collect: [:each | each asLowercase ])
|
||||
]
|
||||
|
||||
{ #category : #'*Grafoscopio-Utils' }
|
||||
String >> isOrgModeHeader [
|
||||
^ self beginsWithAnyOf: #('* ' '** ' '*** ' '**** ' '***** ' '***** ')
|
||||
|
Loading…
Reference in New Issue
Block a user