我试过这样的事情:
use Text::ParseWords;
my $var="Id;Id2;my name 'is Ankit;code";
my @temp = quotewords('\;',1,$var);
my $length = scalar @temp;
print "$length\n";
我可以使用split()但是它不适用于 - " Id; Id2;"我的名字是; Ankit&#34 ;; code"。有什么建议 ?
答案 0 :(得分:1)
你必须逃避单引号。
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
var img = new Image();
img.onload = function() {
context.drawImage(this, 0, 0, canvas.width, canvas.height);
}
img.src="data:image/gif;base64,R0lGODlhDwAPAKECAAAAzMzM/////wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4MLwWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw==";
var dataURL = context.toDataURL('image/png');