d2c_convert

Top  Previous  Next

Pretranslated C++ code > Delphi RTL/VCL > C++ code for C++Builder > d2c_convert

d2c_convert contains Delphi2Cpp II helper functions to convert different string and array types into each other.

 

 

AnsiString wstr2str(const System::WideString& xs);

WideString str2wstr(const System::AnsiString& xs);

AnsiChar wchar2char(WideChar xc);

WideChar char2wchar(AnsiChar xc);

 

System::AnsiString wstr2astr(const System::WideString& xs);

System::AnsiString ustr2astr(const System::UnicodeString& xs);

System::AnsiString sstr2astr(const System::SmallString<255>& xs);

 

System::WideString astr2wstr(const System::AnsiString& xs);

System::WideString ustr2wstr(const System::UnicodeString& xs);  // see WStrFromUStr

System::WideString sstr2wstr(const System::SmallString<255>& xs);

 

System::UnicodeString astr2ustr(const System::AnsiString& xs);

System::UnicodeString wstr2ustr(const System::WideString& xs);  // see UStrFromWStr

System::UnicodeString sstr2ustr(const System::SmallString<255>& xs);

 

void* astr2address(const System::AnsiString& xs, int index = 0);

void* wstr2address(const System::WideString& xs, int index = 0);

void* ustr2address(const System::UnicodeString& xs, int index = 0);

void* sstr2address(const System::SmallString<255>& xs, int index = 0);

 

System::PWideChar address2pwchar(void* p);

 

System::PAnsiChar astr2pchar(const System::AnsiString& xs, int index = 0);

System::PAnsiChar wstr2pchar(const System::WideString& xs, int index = 0);

System::PAnsiChar ustr2pchar(const System::UnicodeString& xs, int index = 0);

System::PAnsiChar sstr2pchar(const System::SmallString<255>& xs, int index = 0);

 

System::PWideChar astr2pwchar(const System::AnsiString& xs, int index = 0);

System::PWideChar wstr2pwchar(const System::WideString& xs, int index = 0);

System::PWideChar ustr2pwchar(const System::UnicodeString& xs, int index = 0);

System::PWideChar sstr2pwchar(const System::SmallString<255>& xs, int index = 0);

System::PWideChar ustr2punichar(const System::UnicodeString& xs, int index = 0);

 

 

inline System::ShortString ustr2sstr(const System::UnicodeString& xs) ...

inline System::ShortString astr2sstr(const System::AnsiString& xs) ...

template <class T> T* array2ptr(const DynamicArray<T>& s, int offset = 0) ...

inline unsigned char* bytearray2pbyte(const DynamicArray<unsigned char>& s, int offset = 0) ...

inline PAnsiChar bytearray2pchar(const DynamicArray<unsigned char>& s, int offset = 0) ...

inline void* bytearray2pvoid(const DynamicArray<unsigned char>& s, int offset = 0) ...

inline System::PAnsiChar wchararray2pchar(const DynamicArray<WideChar>& s, int offset = 0) ...

inline System::PWideChar wchararray2pwchar(const DynamicArray<WideChar>& s, int offset = 0) ...

 

template <typename Type, Type Low, Type High> System::Set<Type, Low, High> IntToSet( int xi ) ...

template <typename Type, Type Low, Type High> int SetToInt( const System::Set<Type, Low, High>& xsi) ...

template <typename Type, Type Low, Type High> unsigned char ToByte(const System::Set<Type, Low, High>& xset) ...

 

template <unsigned char sz = 255> SmallString<sz> astr2sstr(const AnsiString xs) ...

template <unsigned char sz> SmallString<sz> wstr2sstr(const WideString xs) ...

template <unsigned char sz> SmallString<sz> sstr2ustr(const UnicodeString xs) ...

template <unsigned char sz> SmallString<255> sstr2sstr(const SmallString<sz>& xs) ...

 

template <class T> std::vector<T> DynArrayToVector(const DynamicArray<T> &arr) ...

template <class T> std::vector<T> move(DynamicArray<T>& source) ...

template <class T> DynamicArray<T> VecorToDynArray(const std::vector<T> &arr) ...

 

 

 



This page belongs to the DelphiXE2Cpp11 Documentation

DelphiXE2Cpp11 home  Content