[ create a new paste ] login | about

Link: http://codepad.org/Zr5lsXXm    [ raw code | output | fork ]

Perl, pasted on Mar 8:
1
2
3
4
5
6
7
8
9
10
11
12
#!perl -l
use strict;
use warnings;
use utf8;
sub check {
    $_[0] !~ /\p{C}/;
}
print 0+check("妥当な 文字列");
print 0+check("妥当な 文字列"); # fullwidth space
print 0+check("妥当な\t文字列");
print 0+check("妥当な 文字列\n");
print 0+check("\x{00}\x{01}\x{02}\x{03}");


Output:
1
2
3
4
5
1
1
0
0
0


Create a new paste based on this one


Comments: