請問有誰真的知道....string 如何轉成 AnsiString.......
請儘速回覆至作者信箱.....謝謝!!
A string represents a sequence of characters. Object Pascal supports the
following predefined string types.
Type Maximum length Memory required Used for
---------------------------------------------------------------------------------
ShortString 255 characters 2 to 256 bytes backward compatibility
AnsiString ~2^31 characters 4 bytes to 2GB 8-bit (ANSI) characters
WideString ~2^30 characters 4 bytes to 2GB Unicode characters;
//======================================================================
AnsiString
Header vcl/dstring.h
Description
C++Builder implements the AnsiString type as a class. AnsiString is
designed to function like the Delphi long string type.
Accordingly, AnsiString provides the following string handling
characteristics which are required when you call VCL-type functions
that use any of the Delphi long string types.
//======================================================================
AnsiString::AnsiString
Description
The constructor for AnsiString is overloaded as follows:
__fastcall AnsiString();
Creates an empty string.
__fastcall AnsiString(const char* src);
Creates a null-terminated string from a character array.
__fastcall AnsiString(const AnsiString& src);
(Copy constructor.) Creates a copy of an AnsiString.
__fastcall AnsiString(const char* src, unsigned char len);
Creates a null-terminated string that is a copy of the first len
characters of src. For example, if src contains the character
string ello�and len is 2, then the AnsiString that is created
would contain the null-terminated string e�
__fastcall AnsiString(const wchar_t* src);
Creates a null-terminated string from a wide character array.
__fastcall AnsiString(int src);
Creates a null-terminated string from an int. The string contains the string
representation of the int value given by src.
__fastcall AnsiString(double src);
Creates a null-terminated string from a double.
The string contains the string representation of the floating-point value
given by src. The conversion uses general number format with 15
significant digits.
--
◎ [1;31m龍 [32m貓 [33m資 [34m訊 [35m天 [36m地 [0m( [1mbbs.mgt.ncu.edu.tw [0m)
◎[ [1;33;46mPowerGet [0m]From: as1po75.ty.ficnet.net.tw
這樣不行吧 要改為
AnsiString Temp = AnsiString(Test.c_str());
AnsiString的建構元為
__fastcall AnsiString();
__fastcall AnsiString(const char* src);
__fastcall AnsiString(const AnsiString& src);
__fastcall AnsiString(const char* src, unsigned char len);
__fastcall AnsiString(const wchar_t* src);
__fastcall AnsiString(int src);
__fastcall AnsiString(double src);
__fastcall AnsiString(char src);
__fastcall AnsiString(short);
__fastcall AnsiString(unsigned short);
__fastcall AnsiString(unsigned int);
__fastcall AnsiString(long);
__fastcall AnsiString(unsigned long);
__fastcall AnsiString(__int64);
__fastcall AnsiString(unsigned __int64);
__fastcall AnsiString(const WideString &src);
並沒有std::string的type
--
I feel as if I should succeed in doing something in mathematics,
although I cannot see why it is so very important.
[1;36m˙˙ [37m [33m [37m [31m [30m ˙ [35m--HELEN KELLER(1898) [;m
--
[m※ Origin: 雲林科技大學藍天使 <bbs.yuntech.edu.tw> [From: 211.22.142.170]