File tree 1 file changed +18
-20
lines changed
1 file changed +18
-20
lines changed Original file line number Diff line number Diff line change @@ -46,29 +46,27 @@ let escaped = function
46
46
bytes_unsafe_set s 3 (unsafe_chr (48 + n mod 10 ));
47
47
unsafe_to_string s
48
48
49
- let lowercase c =
50
- if (c > = 'A' && c < = 'Z' )
51
- || (c > = '\192' && c < = '\214' )
52
- || (c > = '\216' && c < = '\222' )
53
- then unsafe_chr(code c + 32 )
54
- else c
49
+ let lowercase = function
50
+ | 'A' .. 'Z'
51
+ | '\192' .. '\214'
52
+ | '\216' .. '\222' as c ->
53
+ unsafe_chr(code c + 32 )
54
+ | c -> c
55
55
56
- let uppercase c =
57
- if (c > = 'a' && c < = 'z' )
58
- || (c > = '\224' && c < = '\246' )
59
- || (c > = '\248' && c < = '\254' )
60
- then unsafe_chr(code c - 32 )
61
- else c
56
+ let uppercase = function
57
+ | 'a' .. 'z'
58
+ | '\224' .. '\246'
59
+ | '\248' .. '\254' as c ->
60
+ unsafe_chr(code c - 32 )
61
+ | c -> c
62
62
63
- let lowercase_ascii c =
64
- if (c > = 'A' && c < = 'Z' )
65
- then unsafe_chr(code c + 32 )
66
- else c
63
+ let lowercase_ascii = function
64
+ | 'A' .. 'Z' as c -> unsafe_chr(code c + 32 )
65
+ | c -> c
67
66
68
- let uppercase_ascii c =
69
- if (c > = 'a' && c < = 'z' )
70
- then unsafe_chr(code c - 32 )
71
- else c
67
+ let uppercase_ascii = function
68
+ | 'a' .. 'z' as c -> unsafe_chr(code c - 32 )
69
+ | c -> c
72
70
73
71
type t = char
74
72
You can’t perform that action at this time.
0 commit comments