Subversion Repositories Shiroi

Rev

Rev 32 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32 Rev 33
Line 1... Line 1...
1
/* $Id: char.c 32 2024-09-01 08:51:40Z nishi $ */
1
/* $Id: char.c 33 2024-09-01 09:24:55Z nishi $ */
2
 
2
 
3
#include "char.h"
3
#include "char.h"
4
 
4
 
5
char toupper(char c){
5
char toupper(char c){
6
	if('a' <= c && c <= 'z'){
6
	if('a' <= c && c <= 'z'){
Line 25... Line 25...
25
}
25
}
26
 
26
 
27
int strnum(const char* str){
27
int strnum(const char* str){
28
	int i = 0;
28
	int i = 0;
29
	int num = 0;
29
	int num = 0;
30
	for(i = strlen(str) - 1; i >= 0; i--){
30
	for(i = 0; str[i] != 0; i++){
31
		num = num * 10;
31
		num = num * 10;
32
		num += str[i] - '0';
32
		num += str[i] - '0';
33
	}
33
	}
34
	return num;
34
	return num;
35
}
35
}