Retrieve 1st 3 characters from string

Good morning

I need to retrieve the 1st 3 chars from a string

Eg:
sString = "Primeiro"
sString1 = left(sString,3) \VB6

Given sString, how can I define that sString1 will be 'Pri'.

I'll appreciate your help once again.
Thanks on advance

Best regards
Pedro Ferrer

The Arduino isn't programmed using VB, and String is not a basic type (prior to 0019, anyway). So, we need to know just which definition of string you are referring to.

If it's a string as in NULL-terminated array of chars, strncpy can copy n characters from one array to another.

If it's a class, there should be a member in that class to extract a substring.

Hello

Thanks Paul.
Thanks to your tip, I've found some documentation here http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=print;num=1231650517

strncpy( yearString, timeString, 4); // copy the first four characters of timeString into the year string
year = atoi(yearString); // convert ASCII year string to integer and store in the year integer variable

Thanks once again by your greatful help
Best regards
Pedro Ferrer

char source[] = "Primeiro";
char destination[4];

for(int i = 0; i < 3; i++) destination[i] = source[i];
destination[3] = '\0';

Have a look at WString.h