Cargo Features
unicodeit has no features set by default.
[dependencies]
unicodeit = { version = "0.2.0", features = ["naive-impl", "optimized-impl", "prefer-optimized-impl"] }
- naive-impl
-
Expose the naive implementation of the
replace
functionThis function is currently less buggy than the optimized implementation, so it is the default implementation of
replace
.This feature flag simply exposes the naive implementation as part of the public API. It does not affect the default implementation and is primarily intended for testing.
- optimized-impl
-
Expose the optimized implementation of the
replace
function.While faster and avoiding regex bloat, this is sometimes inconsistent with the behavior of the original library. For this reason, it is not the default implementation.
This feature flag simply exposes the optimized implementation as part of the pub API. It does not affect the default implementation and is primarily intended for testing.
- prefer-optimized-impl
-
Prefer the optimized implementation of the
replace
function instead of the naive implementation.The behavior may occasionally differ from the orgiinal library, but avoids the
regex
dependency and is much more efficient.