大神求帮助啊 一天了都
解决方案 »
- 关于js 的history.back()
- 跪求网页代码问题原因
- 请教一个对象数组的问题?
- 如何把打包进去的EXE文件按静态默认的路径安装
- javascript在不同显示屏去图片坐标的问题,急!!!高手帮我看看
- 浮动层和下拉框的 问题 请指教了!
- 请教高手问题呀
- [求助]在同一个asp网页中,怎样将javascript中的一个变量的值传给VBscript中?
- 用javascript判断表单的单选按钮是否被选种(急)
- 一个文本筐只能输入从n到m的整数,怎么写?
- 用js切割一张图片,然后再一个三成三的表格中展示九张小图片的代码怎么写?
- easyUI数据网格行扩展报错$.fn.datagrid is undefined
{
__block BOOL returnValue = NO;
[string enumerateSubstringsInRange:NSMakeRange(0, [string length])
options:NSStringEnumerationByComposedCharacterSequences
usingBlock:^(NSString * _Nullable substring, NSRange substringRange, NSRange enclosingRange, BOOL * _Nonnull stop) {
const unichar hs = [substring characterAtIndex:0];
// surrogate pair
if (0xd800 <= hs && hs <= 0xdbff)
{
if (substring.length > 1)
{
const unichar ls = [substring characterAtIndex:1];
const int uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
if (0x1d000 <= uc && uc <= 0x1f918)
{
returnValue = YES;
}
}
}
else if (substring.length > 1)
{
const unichar ls = [substring characterAtIndex:1];
if (ls == 0x20e3 || ls == 0xFE0F || ls == 0xd83c)
{
returnValue = YES;
}
}
else
{
// non surrogate
if (0x2100 <= hs && hs <= 0x27ff)
{
returnValue = YES;
}
else if (0x2B05 <= hs && hs <= 0x2b07)
{
returnValue = YES;
}
else if (0x2934 <= hs && hs <= 0x2935)
{
returnValue = YES;
}
else if (0x3297 <= hs && hs <= 0x3299)
{
returnValue = YES;
}
else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 || hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b || hs == 0x2b50)
{
returnValue = YES;
}
}
}];
return returnValue;
}
$(result).each(function(i, o){
o.contentShow = o.content.replace(/\[(\d)-(\d)\]/g, function(m, p1, p2){
return '<span class="bq" style="background-position: -' + p2*27 + 'px -' + p1*27 + 'px;"></span>';
});
});