How do i type cast a std::string object into APT_String object in a buildop stage??
Rajesh
String type casting
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 24
- Joined: Sat Oct 15, 2005 1:09 pm
String type casting
Regards,
Rajesh
Rajesh
What do you mean by 'std::string'?
If you have a standard C string (i.e. an array of characters) or can convert your string to this format, then there are built-in conversions.
Check out the header files in AscentialRootDir/DataStage/PXEngine/include/apt_util. The most useful headers in this case would be basicstring.h and string.h. The basicstring.h defines a parent class of APT_BasicString from which APT_String, defined in string.h, is derived.
APT_String has constructors that have parameters of a standard C-string with an optional length:
For example:
Hope this helps.
Brad.
If you have a standard C string (i.e. an array of characters) or can convert your string to this format, then there are built-in conversions.
Check out the header files in AscentialRootDir/DataStage/PXEngine/include/apt_util. The most useful headers in this case would be basicstring.h and string.h. The basicstring.h defines a parent class of APT_BasicString from which APT_String, defined in string.h, is derived.
APT_String has constructors that have parameters of a standard C-string with an optional length:
Code: Select all
APT_String(const char *str)
-or-
APT_String(const char *str, APT_Int32 len)
Code: Select all
char myCString1[20]="Have a nice day.";
char *myCString2="Hello world.";
APT_String myDSString1(myCString1, 20);
APT_String myDSString2(myCString2);
Brad.
-
- Participant
- Posts: 24
- Joined: Sat Oct 15, 2005 1:09 pm