File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
//! The 7-bit [ASCII](https://en.wikipedia.org/wiki/ASCII) character encoding standard.
2
2
//!
3
- //! This is not to be confused with the 8-bit [Extended ASCII](https://en.wikipedia.org/wiki/Extended_ASCII).
3
+ //! This is not to be confused with the 8-bit [extended ASCII](https://en.wikipedia.org/wiki/Extended_ASCII) character encoding .
4
4
//!
5
5
//! Even though this module concerns itself with 7-bit ASCII,
6
6
//! functions use `u8` as the type instead of `u7` for convenience and compatibility.
@@ -260,6 +260,7 @@ pub fn isBlank(c: u8) bool {
260
260
return (c == ' ' ) or (c == '\x09 ' );
261
261
}
262
262
263
+ /// Upper-cases the character and returns it as-is if it's already upper-cased.
263
264
pub fn toUpper (c : u8 ) u8 {
264
265
if (isLower (c )) {
265
266
return c & 0b11011111 ;
@@ -268,6 +269,7 @@ pub fn toUpper(c: u8) u8 {
268
269
}
269
270
}
270
271
272
+ /// Lower-cases the character and returns it as-is if it's already lower-cased.
271
273
pub fn toLower (c : u8 ) u8 {
272
274
if (isUpper (c )) {
273
275
return c | 0b00100000 ;
You can’t perform that action at this time.
0 commit comments