1
0

strfn.hpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef _RAR_STRFN_
  2. #define _RAR_STRFN_
  3. const char* NullToEmpty(const char *Str);
  4. const wchar* NullToEmpty(const wchar *Str);
  5. void IntToExt(const char *Src,char *Dest,size_t DestSize);
  6. enum ACTW_ENCODING { ACTW_DEFAULT, ACTW_OEM, ACTW_UTF8};
  7. void ArcCharToWide(const char *Src,wchar *Dest,size_t DestSize,ACTW_ENCODING Encoding);
  8. int stricomp(const char *s1,const char *s2);
  9. int strnicomp(const char *s1,const char *s2,size_t n);
  10. wchar* RemoveEOL(wchar *Str);
  11. wchar* RemoveLF(wchar *Str);
  12. void strncpyz(char *dest, const char *src, size_t maxlen);
  13. void wcsncpyz(wchar *dest, const wchar *src, size_t maxlen);
  14. void strncatz(char* dest, const char* src, size_t maxlen);
  15. void wcsncatz(wchar* dest, const wchar* src, size_t maxlen);
  16. #if defined(SFX_MODULE)
  17. unsigned char etoupper(unsigned char c);
  18. #endif
  19. wchar etoupperw(wchar c);
  20. bool IsDigit(int ch);
  21. bool IsSpace(int ch);
  22. bool IsAlpha(int ch);
  23. void BinToHex(const byte *Bin,size_t BinSize,char *Hex,wchar *HexW,size_t HexSize);
  24. #ifndef SFX_MODULE
  25. uint GetDigits(uint Number);
  26. #endif
  27. bool LowAscii(const char *Str);
  28. bool LowAscii(const wchar *Str);
  29. int wcsicompc(const wchar *s1,const wchar *s2);
  30. int wcsnicompc(const wchar *s1,const wchar *s2,size_t n);
  31. void itoa(int64 n,char *Str,size_t MaxSize);
  32. void itoa(int64 n,wchar *Str,size_t MaxSize);
  33. const wchar* GetWide(const char *Src);
  34. const wchar* GetCmdParam(const wchar *CmdLine,wchar *Param,size_t MaxSize);
  35. #ifndef RARDLL
  36. void PrintfPrepareFmt(const wchar *Org,wchar *Cvt,size_t MaxSize);
  37. #endif
  38. #endif