We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f91f418 commit 29f6e65Copy full SHA for 29f6e65
tests/double_width.txt
@@ -0,0 +1,5 @@
1
+Always double width:
2
+汉字
3
+
4
+Ambiguous width:
5
+αα
tests/spam.cc
@@ -0,0 +1,26 @@
+#include <stdio.h>
+#include <stdlib.h>
+void setline(char* s, int n) {
+ int l = random() % n;
+ int j;
6
+ for (j = 0; j < l; ++j) {
7
+ s[j] = 'A' + (random() % 60);
8
+ }
9
+ s[j] = 0;
10
+}
11
12
+int main(int argc, char*argv[]) {
13
+ int n;
14
+ if (argc == 1) {
15
+ n = 1000000;
16
+ } else {
17
+ n = atoi(argv[1]);
18
19
+ for (int i = 0; i < n; ++i) {
20
+ char buffer[100];
21
+ setline(buffer, sizeof(buffer)-1);
22
+ printf("%s\n", buffer);
23
24
+ return 0;
25
26
0 commit comments