File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1169,6 +1169,15 @@ fn is_whitespace(s: str) -> bool {
1169
1169
ret all ( s, char:: is_whitespace) ;
1170
1170
}
1171
1171
1172
+ #[ doc = "
1173
+ Returns true if the string contains only alphanumerics
1174
+
1175
+ Alphanumeric characters are determined by `char::is_alphanumeric`
1176
+ " ]
1177
+ fn is_alphanumeric ( s : str ) -> bool {
1178
+ ret all ( s, char:: is_alphanumeric) ;
1179
+ }
1180
+
1172
1181
#[ doc = "
1173
1182
Returns the string length/size in bytes not counting the null terminator
1174
1183
" ]
@@ -1833,6 +1842,13 @@ impl extensions for str {
1833
1842
" ]
1834
1843
#[ inline]
1835
1844
fn is_whitespace ( ) -> bool { is_whitespace ( self ) }
1845
+ #[ doc = "
1846
+ Returns true if the string contains only alphanumerics
1847
+
1848
+ Alphanumeric characters are determined by `char::is_alphanumeric`
1849
+ " ]
1850
+ #[ inlune]
1851
+ fn is_alphanumeric ( ) -> bool { is_alphanumeric ( self ) }
1836
1852
#[ inline]
1837
1853
#[ doc ="Returns the size in bytes not counting the null terminator" ]
1838
1854
fn len ( ) -> uint { len ( self ) }
You can’t perform that action at this time.
0 commit comments