Adds diacritical support for Pharo and Squeak Smalltalk.
pi install Diacriticals
EpMonitor disableDuring: [
Metacello new
onWarningLog;
repository: 'github://hernanmd/Diacriticals/repository';
baseline: 'Diacriticals';
load ].
If you want to add the ISO3166 to your Metacello Baselines or Configurations, copy and paste the following expression:
" ... "
spec
baseline: 'Diacriticals'
with: [ spec repository: 'github://hernanmd/Diacriticals/repository' ];
" ... "
Find if a String contains any diacritical character:
'cancion' hasAnyDiacritical. ----> false
'canción' hasAnyDiacritical. ----> true
'á' hasAnyDiacritical. ----> true
'garçon' hasAnyDiacritical. ----> true
Find if a String is "diacritical equivalent" of another one:
'canción' isDiacriticalEquivalentOf: 'cancien' ----> false
'cancion' isDiacriticalEquivalentOf: 'canción' ----> true
Find how many diacritical "replacements" are between two Strings:
'canción' diacriticalMatch: 'cancien' ----> 0.
'canción' diacriticalMatch: 'cancion' ----> 1.
'empêché' diacriticalMatch: 'empeche' ----> 2.