Documentation ¶
Overview ¶
Package thai is a subpackage that provides additional string sanitization functions that are customized for Thai characters and scripts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AdditionalMapping = []transform.Transformer{ runes.ReplaceIllFormed(), fuzzyTransform.StripNonPrintTransformer, fuzzyTransform.ToNormalSpaceTransformer, fuzzyTransform.ToNormalHyphenTransformer, diacritics.AsciiFoldTransformer, diacritics.StripDiacriticalMarksTransformer, BigramRecombineTransformer, RemoveRepeatedMarksTransformer, fuzzyTransform.RespaceTransformer, }
AdditionalMapping contains a slice of all string transformers chained together which is used as additional mapping for PRECIS profile.
var BigramRecombineTransformer transform.Transformer = &bigramRecombineTransformer{}
BigramRecombineTransformer is a Unicode stream transformer object which removes all leading and trailing white-spaces, then it reduces all inter-word white-spaces into a single normal space.
var PrecisProfile = precis.NewFreeform( precis.FoldWidth, precis.AdditionalMapping(func() transform.Transformer { return transform.Chain(AdditionalMapping...) }), precis.FoldCase(cases.HandleFinalSigma(true)), )
PrecisProfile is a Unicode PRECIS profile which prepare strings for a more secure comparison.
var RemoveRepeatedMarksTransformer transform.SpanningTransformer = &removeRepeatedMarksSpanningTransformer{}
RemoveRepeatedMarksTransformer is a Unicode stream transformer object which removes repeated Thai ascending and descending marks except the first.
var Sanitize = factory.MakeStringTransformFunction( PrecisProfile.NewTransformer(), )
Sanitize extends on the LatinExtendedSanitize by additionally sanitize an input string containing Thai scripts.
Functions ¶
This section is empty.
Types ¶
This section is empty.