PhoneticUtils class
Common helpers and utilities.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clean(
String value, {bool allowLatin = true}) → String -
Returns a cleaned string (that is ready for encoding) by performing the
following steps on
value
: -
codeUnitAt(
String value, int index) → int -
Returns the character from
value
atindex
or$nul
if the index is out of range. -
differenceEncoded(
String? e1, String? e2) → int -
Returns the number of characters that are the same in the
e1
ande2
encoded strings. -
isSimpleVowel(
int charCode) → bool -
Returns
true
ifcharCode
is a simple vowel ($A
,$E
,$I
,$O
,$U
). This does not include$Y
. -
isSpecialCharacter(
int charCode) → bool -
Returns
true
ifcharCode
is a special character. -
isVowel(
int charCode) → bool -
Returns
true
ifcharCode
is a vowel (including latin characters). -
isVowelAt(
String value, int index) → bool -
Returns
true
if the character atindex
invalue
is a vowel (including special latin characters). The value should be cleaned first (which optionally removes latin characters if they are not desired). -
primaryDifference(
PhoneticEncoder encoder, String s1, String s2) → int -
Encodes
s1
ands2
usingencoder
and then returns the similarity for the PhoneticEncoding.primary encoding. -
removeRepeatRuns(
List< int> chars) → void -
Removes runs of repeated characters from the
chars
provided. -
startsWith(
String value, Pattern pattern, [int index = 0]) → bool -
Returns
true
if the character fromvalue
atindex
matchespattern
orfalse
(including ifindex
is if out of range).