[vtk-developers] any objections to a vtkString ENH?
Andy Cedilnik
andy.cedilnik at kitware.com
Tue Jul 9 16:49:57 EDT 2002
Hi Dean,
It is in...
I modified it a bit to support empty strings, so you should be able to
do for example:
char* s = vtkString::Append("Hello", "World");
producing: "HelloWorld", but also:
char* s = vtkString::Append("1 + 1 =", 0);
producing: "1 + 1 =".
Andy
On Tue, 2002-07-09 at 15:46, Dean Inglis wrote:
> Hi,
>
> would anyone object to adding an Append function to vtkString?
>
> char* vtkString::Append(const char* str1, const char* str2)
> {
> if ( !str1 || !str2 )
> {
> return 0;
> }
> char *newstr = new char[ vtkString::Length(str1) + vtkString::Length(str1)
> +1];
> if ( !newstr )
> {
> return 0;
> }
> strcat(newstr, str1);
> strcat(newstr, str2);
> return newstr;
> }
>
> thanks,
> Dean
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/vtk-developers
More information about the vtk-developers
mailing list