string to an array of string

Hello there, can anyone tell me how to copy a string at a particular place in an array of string.

You mean String to Array of char?

String result="hello";
char payload[result.length()+1];
result.toCharArray(payload, sizeof(payload));

payload is now holds hello in char array.

sarouje, no i need to transfer a particular string into a string array for storage purpose

narayanambarish:
sarouje, no i need to transfer a particular string into a string array for storage purpose

I think what the OP might want is a way to convert a String object into an array of char. That is, he is not asking about arrays of Strings.

OP: see this documentation.

No, OP talks about string (lower case s) :smiley:

char strA[] = "Hello world";
char strB[32];

// initialize strB; mostly to make sure that we have a nul terminator regardless of what we copy
memset(strB, 0, sizeof(strB));
// copy from character 7 onwards, 5 characters
memcpy(strB, &strA[6], 5);

The above will place world in strB.

I think we all go into assumption mode.

@narayan, write some code that explains your requirement and post it, even a pseudo code will be good enough to start.