xunwap

专注移动互联网服务

正在浏览由 admin 发布的文章

PHP官方网站上的中文文档由于更新速度过慢,导致中文文档与英文文档之间的更新进度差距太多,使得从其中文文档中无法获得PHP文档中最新的信息和说明。好在现在有一份新的PHP中文文档,由HonestQiao维护,文档中带最新评论。PHP中文文档托管在google code上,其更新记录如下:

1. 最新PHP中文/英文手册,每周SVN同步到最新版本
2. 整合在线评论信息,蕴含巨大宝藏,学习进阶必备
3. CHM格式,方便随身携带,可与其他软件完美配合使用
4. 导航详细,索引完整,搜索方便
5. 需求征集,打造最易用PHP中文CHM手册

一、更新日志:ChangeLog
0. 2007105日,开始提供本CHM手册
1. 2008319日,因官方问题,老版本暂停继续更新
2. 201081日,准备新版本,学习最新资料,准备代码和处理脚本
3. 201085日,2010演示版V0.1提供测试,基本整合最新手册和评论
4. 2010811日,2010演示版V0.2提供测试,样式修改基本完善
5. 2010812日,2010演示版V0.3提供测试,版式完善,加上了CHM导航目录和索引,可供正式使用
6. 2010817日,2010演示版V0.4提供测试,修正编码问题,可供Windows/CHMChmSeeiCHM等完好好使用!
7. 2010829日,2010演示版V0.5提供测试,加入在线中文和英文手册的连接,提供英文手册CHM整合评论版。
8. 201092日,2010演示版V0.6提供测试,特别纪念PHP手册中文翻译补完计划手册首次提交 PHP官方SVN
9. 201099日,2010演示版V0.7提供测试,评论内PHP代码高亮,并加入手册新版本更新提醒功能(下次更新后,即可自动提示)。
10. 2010918日,2010演示版V0.8提供测试,9.18纪念版。
11. 2010926日,2010演示版V0.9提供测试
12. 2010102日,正在完善相关处理脚本和程序,为正式发布做准备;因手册本身无实质变化,暂不上传本周版本!
13. 20101010日,2010演示版V0.9.2提供测试
14. 20101112日,2010演示版V0.9.3提供测试,开始修复手册中过期内容
15. 20101129日,2010演示版V0.9.4提供测试,修复大量内部跳转链接问题
16. 20101210日,2010演示版V0.9.5提供测试,纪念PHP5.3.4发布
17. 201111日,V0.9.6提供测试,元旦快乐

二、当前问题列表:BUG
1. CHM左则目录没有目录细节:已处理
2. CHM左则索引基本没有:已处理
3. CHM导航信息与CHM内容编码不一致,导致部分chm查看器乱码:已处理
4. xCHM查看时导航乱码(主要因为xCHM自身问题,望各位提供解决方法)

三、当前需求列表:TODO
1. 评论内PHP代码没有高亮处理:已处理[/color[
2. 每个页面加上到对应在线英文manual网址的连接:已处理
3. 加入更新手册后,自动提醒功能:已处理

四、感谢测试(部分人员,其他未列出请见谅):Thanks
jayeeliu@gmail.com、QQ/50753256、QQ/496995561、QQ/307664144、QQ/258133984、QQ/77304226

五、说明:More
1. 因为属于演示版,所以可能存在问题,例如可能版式、乱码等,但正在全力完善!
2. 请协助改进,与 http://docs.php.net/manual/en/index.php 对比测试
3. 如有问题,敬请告知,多谢了!
4. 反馈请致信 honestqiao@163.com,标题【PHP手册反馈】;
  亦可通过QQ/5601680、MSN/honestqiao@hotmail.com反馈
5. 一旦测试反馈和修改完善,就进入正式发布队列,每周更新
6. 下载后如打开无法正常查看,请从鼠标右键查看属性,点击解除锁定即可

六、友情推荐:Friend
1. Coreseek开源中文检索引擎,http://www.coreseek.cn/,基于Sphinx,专业针对中文应用,MySQL绝配!

PHP中文文档下载

本站原创文章,转载请注明出处

用std::string来代替char*作为字符串处理的方式在现代的C++开发中已是约定俗成的规则了。不过std::string的公有成员函数的功能是很有限的,而且操作起来并不是很方便,借助于 std::algorithms 来操作std::string时,因为std::algorithms需要面对的是容器的通用操作,也以,也有部分我们所需要的std::string操作无法通过std::algorithms来实现。好在 String Algorithms Library 为std::string弥补了众多在操作上的不足之处。先看看 String Algorithms Library 的函数:

Algorithms

Table 21.1. Case Conversion

Algorithm name Description Functions
to_upper Convert a string to upper case to_upper_copy()
to_upper()
to_lower Convert a string to lower case to_lower_copy()
to_lower()

Table 21.2. Trimming

Algorithm name Description Functions
trim_left Remove leading spaces from a string trim_left_copy_if()
trim_left_if()
trim_left_copy()
trim_left()
trim_right Remove trailing spaces from a string trim_right_copy_if()
trim_right_if()
trim_right_copy()
trim_right()
trim Remove leading and trailing spaces from a string trim_copy_if()
trim_if()
trim_copy()
trim()

Table 21.3. Predicates

Algorithm name Description Functions
starts_with Check if a string is a prefix of the other one starts_with()
istarts_with()
ends_with Check if a string is a suffix of the other one ends_with()
iends_with()
contains Check if a string is contained of the other one contains()
icontains()
equals Check if two strings are equal equals()
iequals()
lexicographical_compare Check if a string is lexicographically less then another one lexicographical_compare()
ilexicographical_compare()
all Check if all elements of a string satisfy the given predicate all()

Table 21.4. Find algorithms

Algorithm name Description Functions
find_first Find the first occurrence of a string in the input find_first()
ifind_first()
find_last Find the last occurrence of a string in the input find_last()
ifind_last()
find_nth Find the nth (zero-indexed) occurrence of a string in the input find_nth()
ifind_nth()
find_head Retrieve the head of a string find_head()
find_tail Retrieve the tail of a string find_tail()
find_token Find first matching token in the string find_token()
find_regex Use the regular expression to search the string find_regex()
find Generic find algorithm find()

Table 21.5. Erase/Replace

Algorithm name Description Functions
replace/erase_first Replace/Erase the first occurrence of a string in the input replace_first()
replace_first_copy()
ireplace_first()
ireplace_first_copy()
erase_first()
erase_first_copy()
ierase_first()
ierase_first_copy()
replace/erase_last Replace/Erase the last occurrence of a string in the input replace_last()
replace_last_copy()
ireplace_last()
ireplace_last_copy()
erase_last()
erase_last_copy()
ierase_last()
ierase_last_copy()
replace/erase_nth Replace/Erase the nth (zero-indexed) occurrence of a string in the input replace_nth()
replace_nth_copy()
ireplace_nth()
ireplace_nth_copy()
erase_nth()
erase_nth_copy()
ierase_nth()
ierase_nth_copy()
replace/erase_all Replace/Erase the all occurrences of a string in the input replace_all()
replace_all_copy()
ireplace_all()
ireplace_all_copy()
erase_all()
erase_all_copy()
ierase_all()
ierase_all_copy()
replace/erase_head Replace/Erase the head of the input replace_head()
replace_head_copy()
erase_head()
erase_head_copy()
replace/erase_tail Replace/Erase the tail of the input replace_tail()
replace_tail_copy()
erase_tail()
erase_tail_copy()
replace/erase_regex Replace/Erase a substring matching the given regular expression replace_regex()
replace_regex_copy()
erase_regex()
erase_regex_copy()
replace/erase_regex_all Replace/Erase all substrings matching the given regular expression replace_all_regex()
replace_all_regex_copy()
erase_all_regex()
erase_all_regex_copy()
find_format Generic replace algorithm find_format()
find_format_copy()
find_format_all()
find_format_all_copy()()

Table 21.6. Split

Algorithm name Description Functions
find_all Find/Extract all matching substrings in the input find_all()
ifind_all()
find_all_regex()
split Split input into parts split()
split_regex()
iter_find Iteratively apply the finder to the input to find all matching substrings iter_find()
iter_split Use the finder to find matching substrings in the input and use them as separators to split the input into parts iter_split()

Table 21.7. Join

Algorithm name Description Functions
join Join all elements in a container into a single string join
join_if Join all elements in a container that satisfies the condition into a single string join_if()

Boost.String_Algo 的函数功能是相当的丰富了,也简便易用。所以可以在开发过程中大量使用。

BTW:有很多的人都排斥Boost,在一开始的时候我也不使用Boost,因为有太多的人建议我不要用。后来我还是使用了Boost,而且越用越喜欢,也越发感觉到Boost是一个多么灵活,高效,强大的C++ Library;也体会到了为什么可以称Boost具有”工业强度”。在这里,我建议那些不愿意使用Boost的朋友去使用一下Boost,也许你们是听别人建议不要用Boost,也许是自己不愿意使用Boost,但你们一定要去试用Boost中的一些可能用得上的Library,也许用了之后你们的看法会有所改变,也许你们会有不同的发现 :)

本站原创文章,转载请注明出处