File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -345,13 +345,8 @@ pub(crate) fn is_digit(ch: u32) -> bool {
345345 rustpython_unicode:: regex:: is_digit ( ch)
346346}
347347#[ inline]
348- pub ( crate ) fn is_loc_alnum ( ch : u32 ) -> bool {
349- // FIXME: Ignore the locales
350- rustpython_unicode:: regex:: is_locale_alnum ( ch)
351- }
352- #[ inline]
353348pub ( crate ) fn is_loc_word ( ch : u32 ) -> bool {
354- ch == '_' as u32 || is_loc_alnum ( ch)
349+ rustpython_unicode :: regex :: is_locale_word ( ch)
355350}
356351#[ inline]
357352pub ( crate ) const fn is_linebreak ( ch : u32 ) -> bool {
@@ -384,12 +379,8 @@ pub(crate) const fn is_uni_linebreak(ch: u32) -> bool {
384379 rustpython_unicode:: regex:: is_unicode_linebreak ( ch)
385380}
386381#[ inline]
387- pub ( crate ) fn is_uni_alnum ( ch : u32 ) -> bool {
388- rustpython_unicode:: regex:: is_unicode_alnum ( ch)
389- }
390- #[ inline]
391382pub ( crate ) fn is_uni_word ( ch : u32 ) -> bool {
392- ch == '_' as u32 || is_uni_alnum ( ch)
383+ rustpython_unicode :: regex :: is_unicode_word ( ch)
393384}
394385#[ inline]
395386pub fn lower_unicode ( ch : u32 ) -> u32 {
Original file line number Diff line number Diff line change @@ -46,10 +46,12 @@ pub fn is_space(cp: u32) -> bool {
4646 } )
4747}
4848
49+ /// Python's `str.isprintable()` semantics, which treat ASCII space as printable.
4950pub fn is_printable ( cp : u32 ) -> bool {
5051 cp == '\u{0020}' as u32 || is_repr_printable ( cp)
5152}
5253
54+ /// Repr/escape printable semantics, which exclude all Unicode space separators.
5355pub fn is_repr_printable ( cp : u32 ) -> bool {
5456 !matches ! (
5557 general_category( cp) ,
You can’t perform that action at this time.
0 commit comments