Changeset 238 for trunk/kernel/libk
- Timestamp:
- Jul 19, 2017, 3:31:39 PM (7 years ago)
- Location:
- trunk/kernel/libk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/string.c
r223 r238 152 152 } 153 153 154 ///////////////////////////////////// 155 inline uint8_t to_lower( uint8_t c ) 156 { 157 if (c >= 'A' && c <= 'Z') return (c | 0x20); 158 else return c; 159 } 160 161 162 ///////////////////////////////////// 163 inline uint8_t to_upper( uint8_t c ) 164 { 165 if (c >= 'a' && c <= 'z') return (c & ~(0x20)); 166 else return c; 167 } 168 169 -
trunk/kernel/libk/string.h
r23 r238 122 122 int c ); 123 123 124 /******************************************************************************************** 125 * This function returns a lower case ASCII code if input is in [A...Z] range. 126 ******************************************************************************************** 127 * @ c : character to be forced to lower case. 128 * @ return lower case ASCII code. 129 *******************************************************************************************/ 130 inline uint8_t to_lower( uint8_t c ); 131 132 /******************************************************************************************** 133 * This function returns an upper case ASCII code if input is in [a...z] range. 134 ******************************************************************************************** 135 * @ c : character to be forced to upper case. 136 * @ return upper case ASCII code. 137 *******************************************************************************************/ 138 inline uint8_t to_upper( uint8_t c ); 139 124 140 #endif /* _STRING_H_ */
Note: See TracChangeset
for help on using the changeset viewer.