Add a wchar prelude

- This will hopefully make it easier to always include WExt and ToWString, and
  make using WStr/WString more natural
This commit is contained in:
Henrik Hørlück Berg 2023-08-09 00:14:34 +02:00 committed by Johannes Altmanninger
parent b7f7dcf788
commit 5d58652394

View File

@ -10,6 +10,15 @@ pub use widestring::{Utf32Str as wstr, Utf32String as WString};
/// Pull in our extensions.
pub use crate::wchar_ext::{IntoCharIter, WExt};
pub(crate) mod prelude {
pub(crate) use crate::{
wchar::{wstr, IntoCharIter, WString, L},
wchar_ext::{ToWString, WExt},
wutil::{sprintf, wgettext, wgettext_fmt, wgettext_str},
};
pub(crate) use widestring_suffix::widestrs;
}
/// Creates a wstr string slice, like the "L" prefix of C++.
/// The result is of type wstr.
/// It is NOT nul-terminated.