美文网首页
11.06 trim(字符数组)

11.06 trim(字符数组)

作者: 笑而不语_ddbd | 来源:发表于2017-11-13 22:02 被阅读0次

    经过测试发现trim(字符数组),返回的结果为字符数组从开始到第一个‘#0’的内容

    delphi中copy函数
    copy

    举个例子:str := “123456”;str1 := Copy(Str,2,3);结果就是 str1 等于 234。Copy有3个参数,第一个是你要处理的字符串,第二个是你要截取的开始位置,第3个是截取位数。当你的第3个参数大于字符长度,那么效果就是取 开始位置 后的所有字符。str1 := Copy(Str,2,10); 结果就是str1 等于 23456。

    delphi中StrCopy函数

    function StrCopy(Dest: PChar; const Source: PChar): PChar;

    Description

    Use StrCopy to copy Source to Dest. StrCopy returns Dest.

    StrCpy does not perform any length checking. The destination buffer must have room for at least StrLen(Source)+1 characters.

    For length checking, use the StrLCopy function.

    相关文章

      网友评论

          本文标题:11.06 trim(字符数组)

          本文链接:https://www.haomeiwen.com/subject/aeokmxtx.html