Function precis_core::profile::stabilize
source · pub fn stabilize<'a, F, S>(s: S, f: F) -> Result<Cow<'a, str>, Error>
Expand description
Apply rules until the string is stable. Some profiles, especially those that the result of applying these rules does not result in an idempotent operation for all code points SHOULD apply the rules repeatedly until the output string is stable.
§Arguments:
s
: String valuef
: Callback to invoke to apply the rules tos
§Returns
The stable string after applying the rules; if the output string does not stabilize after reapplying the rules three (3) additional times after the first application, the string is rejected as invalid.