Crate math_text_transform [] [src]

Transform text from standard alphanumerical characters to it’s unicode equivalents of a certain variant in the mathematical alphanumeric symbols block (code block U+1D400–U+1D7FF).

use math_text_transform::math_italic;
use math_text_transform::MathTextTransform;

assert_eq!(math_italic('f'), Some('𝑓'));
assert_eq!("Bold".to_math_bold(), "𝐁𝐨𝐥𝐝");

Supported variants are:

References

Reexports

pub use self::bold::math_bold;
pub use self::italic::math_italic;
pub use self::bold_italic::math_bold_italic;
pub use self::sans_serif::math_sans_serif;
pub use self::sans_serif_bold::math_sans_serif_bold;
pub use self::sans_serif_italic::math_sans_serif_italic;
pub use self::sans_serif_bold_italic::math_sans_serif_bold_italic;
pub use self::script::math_script;
pub use self::bold_script::math_bold_script;
pub use self::fraktur::math_fraktur;
pub use self::bold_fraktur::math_bold_fraktur;
pub use self::monospace::math_monospace;
pub use self::double_struck::math_double_struck;

Traits

MathTextTransform

Convenience trait that allows you to call the the transformation straight on a string slice. If a variant doesn't exist for a given character, it is left as is.