[原创]解决Qt在windows发布时提示 Microsoft Visual C++ Runtime Library 错误解决办法
2013-05-16 12:27
603 查看
<script type="text/javascript"><!--
google_ad_client = "pub-4490194096475053";
/* 内容页,300x250,第一屏 */
google_ad_slot = "3685991503";
google_ad_width = 300;
google_ad_height = 250;
// --></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>
![](http://www.corange.cn//uploadfiles/1107_34288.jpg)
//截取一定长度字符串的函数
Function csubstr($str,$start,$len)
{
$strlen=strlen($str);
$clen=0;
for($i=0;$i<$strlen;$i++,$clen++)
{
if ($clen>=$start+$len)
break;
if(ord(substr($str,$i,1))>0xa0)
{
if ($clen>=$start)
$tmpstr.=substr($str,$i,2);
$i++;
}
else
{
if ($clen>=$start)
$tmpstr.=substr($str,$i,1);
}
}
return $tmpstr;
}
Function showShort($str,$len)
{
$tempstr = csubstr($str,0,$len);
if ($str<>$tempstr)
$tempstr .= "..."; //要以什么结尾,修改这里就可以.
return $tempstr;
}
调用方法,使用方法
$Short_Str=showShort($title,15);//
google_ad_client = "pub-4490194096475053";
/* 内容页,300x250,第一屏 */
google_ad_slot = "3685991503";
google_ad_width = 300;
google_ad_height = 250;
// --></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>
![](http://www.corange.cn//uploadfiles/1107_34288.jpg)
//截取一定长度字符串的函数
Function csubstr($str,$start,$len)
{
$strlen=strlen($str);
$clen=0;
for($i=0;$i<$strlen;$i++,$clen++)
{
if ($clen>=$start+$len)
break;
if(ord(substr($str,$i,1))>0xa0)
{
if ($clen>=$start)
$tmpstr.=substr($str,$i,2);
$i++;
}
else
{
if ($clen>=$start)
$tmpstr.=substr($str,$i,1);
}
}
return $tmpstr;
}
Function showShort($str,$len)
{
$tempstr = csubstr($str,0,$len);
if ($str<>$tempstr)
$tempstr .= "..."; //要以什么结尾,修改这里就可以.
return $tempstr;
}
调用方法,使用方法
$Short_Str=showShort($title,15);//
相关文章推荐
- Microsoft Visual C++ Runtime Library 错误解决办法
- Qt生成并发布程序在别的机器上运行 发生Microsoft Visual C++ Runtime Library 错误
- Qt生成并发布程序在别的机器上运行 发生Microsoft Visual C++ Runtime Library 错误
- Microsoft Visual C++ Runtime Library Runtime Error的解决办法
- Microsoft Visual C++ Runtime Library Runtime Error的解决办法
- HEVC中快速块选择时出现Minrosoft Visual C++ Runtime Library 错误的解决办法
- Minrosoft Visual C++ Runtime Library 错误的解决办法
- Microsoft Visual C++ Runtime Library Runtime Error的解决办法
- Microsoft Visual C++ Runtime Library Runtime Error的解决的方法
- Microsoft Visual C++ Runtime Library Runtime Error解决的方式
- Microsoft Visual C++ Runtime Library Runtime Error的解决的方法
- Microsoft Visual C++ Runtime Library Runtime Error的解决的方法
- c++中出现error LNK1123: 转换到 COFF 期间失败的错误解决办法及Microsoft Visual Studio 安装
- “Microsoft Visual C++ Runtime Library”错误
- Microsoft Visual C++ Runtime Library Runtime Error解决的方式
- Microsoft Visual C++ Runtime Library Runtime Error的解决的方法
- Microsoft Visual C++ Runtime Library Runtime Error的解决的方法
- Microsoft Visual C++ Runtime Library Runtime Error解决的方式
- “Microsoft Visual C++ Runtime Library”错误
- 【Python3】error: Microsoft Visual C++ 10.0 is required 错误解决办法