Skip to content

Commit 665471d

Browse files
committed
reference/cctype/toupper.md: Created sample implementation
1 parent 3b77b17 commit 665471d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

reference/cctype/toupper.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,13 @@ toupper('1') = 1
4242
toupper('.') = .
4343
toupper('$') = $
4444
```
45+
46+
## 実装例
47+
```cpp
48+
int toupper(int ch) {
49+
if (islower(ch)) {
50+
ch ^= 32;
51+
}
52+
return ch;
53+
}
54+
```

0 commit comments

Comments
 (0)