联盟首页 协同开发 共创软件 开放源码 软件工程 共创论坛 关于联盟
  您的位置 » 开放源码库【成熟 - 项目摘要 首页 | 分类源码 | 提交源码 | 下载统计 | 原创源码 | 成熟源码 | 代码片断
 
 A class for double zeroterminated string - 项目摘要
摘要 | 管理 | 论坛
文档 | 软件包

源码库中源码数量为18996
有贡献人员名单:

-= 更多 =-
  • ffdshow
  • jasperreports
  • Air Traffic Controller
  • PoolMan
  • virtualdub-win
  • Apache-SSL-Jserv
  • CppUnit
  • FCK editor
  • GLgraph
  • Async Professional
  • -= 更多 =-

    项目描述:
    There are several win32 functions that require the use of a string with embedded NULLs and are terminated with an extra NULL (i will call them DZ strings for short).
    An example of such a DZ string: "part1\0part2\0part3\0\0".
    To name just a few of functions that work with DZ strings:

    GetPrivateProfileSection
    WritePrivateProfileSection
    SQLConfigDataSource
    As most string-functions (strcmp, strchr etc) expect a zeroterminated string, they are of little use when you have to parse a DZ string.
    The CString class could be used to manipulate them, but you must be carefull not to call the non-DZ-aware CString-methods (such as Right(), Mid(), Left(), Replace() and Find()).
    I decided to create a class that helps constructing and parsing those DZ strings. The class is called CDoubleZeroString and is not derived from CString.


    有几个 win32 函数需要使用内部带有NULL的字符串,但仍以另一个NULL作为结束(我将其称为DZ字符串)。
    这种字符串的一个例子是 "part1\0part2\0part3\0\0"。可以处理DZ字符串的函数有:
    GetPrivateProfileSection
    WritePrivateProfileSection
    SQLConfigDataSource
    大多数字符串函数都需要以NULL结尾的字符串,当你必须处理DZ字符串时,很少能找到这样的函数。
    CString 类可以处理它们,但必须明白不能调用非DZ的CString-方法(如 Right(), Mid(), Left(), Replace() and Find())。我决定创建一个类,来帮助构造和分析这种DZ字符串。这个类称为CDoubleZeroString ,它不是派生于 CString。
    来源: http://www.codeguru.com/string/DoubleZeroString.shtml
    类别:
    发布者: cbd002

    最新发布源码包
    软件包 版本号 日期 本地下载
    DoubleZeroString  1.0  2004-04-16 下载

    原始下载连接(国外) http://www.codeguru.com/code/legacy/string/DoubleZeroString.zip

      » 合 作 伙 伴