C++ Builder VCL的字符串函数(2)

原文地址:http://www.yesky.com/20020701/1618451_1.shtml

1. UpperCase
  将指定的AnsiString字符串转换为大写形式,函数原型如下:
  AnsiString __fastcall UpperCase(const AnsiString S);

  2. LowerCase
  将指定的AnsiString字符串转换为小写形式,函数原型如下:
  AnsiString __fastcall LowerCase(const AnsiString S);

  3. CompareStr
  比较两个AnsiString字符串,函数原型如下:
  int __fastcall CompareStr(const AnsiString S1, const AnsiString S2);

  4. CompareText
  比较两个AnsiString字符串,函数原型如下:
  int __fastcall CompareText(const AnsiString S1, const AnsiString S2);

  5. StrLen
  返回字符串的长度,函数原型如下:
  Cardinal __fastcall StrLen(const char * Str);

  6. StrEnd
  返回字符串结尾指针,函数原型如下:
  char * __fastcall StrEnd(const char * Str);

  7. StrMove
  从源字符串向目的字符串拷贝指定数目的字符,函数原型如下:
  char * __fastcall StrMove(char * Dest, const char * Source, Cardinal Count);

  8. StrCopy
  将源字符串拷贝到目的字符串中,函数原型如下:
  char * __fastcall StrCopy(char * Dest, const char * Source);

  9. StrECopy
  将源字符串拷贝到目的字符串中,并返回目的字符串结尾指针,函数原型如下:
  char * __fastcall StrECopy(char * Dest, const char * Source);

  10.StrLCopy
  将源字符串指定数目的字符拷贝到目的字符串中,并返回目的字符串指针,函数原型如下:
  char * __fastcall StrLCopy(char * Dest, const char * Source, Cardinal MaxLen);

  11.StrPCopy
  将AnsiString类型的源字符串拷贝到目的字符串中,并返回目的字符串指针,函数原型如下:
  char * __fastcall StrPCopy(char * Dest, const AnsiString Source);

  12.StrPLCopy
  将源字符串(AnsiString类型)指定数目的字符拷贝到目的字符串中,并返回目的字符串
指针,函数原型如下:
  char * __fastcall StrPLCopy(char * Dest, const AnsiString Source, Cardinal MaxLen);

  13.StrCat
  连接两个字符串,并返回目的字符串指针,函数原型如下:
  char * __fastcall StrCat(char * Dest, const char * Source);

  14.StrLCat
  将指定数目的源字符串连接到目的字符串,并返回目的字符串指针,函数原型如下:
  char * __fastcall StrLCat(char * Dest, const char * Source, Cardinal MaxLen);

  15.StrComp
  两个字符串相到比较,返回比较的结果,函数原型如下:
  int __fastcall StrComp(const char * Str1, const char * Str2);

  16.StrIComp
  两个字符串相互比较(不论大小写),返回比较的结果,函数原型如下:
  int __fastcall StrIComp(const char * Str1, const char * Str2);

  17.StrLComp
  对两个字符串指定数目的字符进行比较操作,函数原型如下:
  int __fastcall StrLComp(const char * Str1, const char * Str2, Cardinal MaxLen);

  18.StrScan
  在指定的字符串中寻找特定的字符,并返回字符串中第一个特定字符的指针,函数原型如下:
  char * __fastcall StrScan(const char * Str, char Chr);

  19.StrRScan
  在指定的字符串中寻找特定的字符,并返回字符串中最后一个特定字符的指针,函数原型如下:
  char * __fastcall StrRScan(const char * Str, char Chr);

  20.StrPos
  在Strl所指定的字符串中寻找Str2所指定的子字符串,并返回Str2在Str2中第一个子字符的指针,函数原型如下:
  char * __fastcall StrPos(const char * Str1, const char * Str2);

  21.StrUpper
  将字符串转换为大写形式,函数原型如下:
  char * __fastcall StrUpper(char * Str);

  22.StrLower
  将字符串转换为小写形式,函数原型如下:
  char * __fastcall StrLower(char * Str);

  23.StrPas
  将指定的字符串转换为AnsiString类型字符串对象,函数原型如下:
  AnsiString __fastcall StrPas(const char * Str);

  24.StrAlloc
  为字符串分配指定字节的内存,并返回内存指针,函数原型如下:
  char * __fastcall StrAlloc(Cardinal Size);

  25.StrBufSize
  返回*Str所指向内存的大小,函数原型如下:
  Cardinal __fastcall StrBufSize(const char * Str);

  26.StrNew
  在堆中为指定字符串分配空间,并将字符串拷贝到此空间中,函数原型如下:
  char * __fastcall StrNew(const char * Str);

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值