Framework (A-Z)

Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.

Class

String

Name

toCharArray()

Examples
String str = String("CCCP");
char array[20];

...

str.toCharArray(array, 20);
Serial.println(array);  // Prints "CCCP"
Description Copies the String's content into an array of chars of the maximum size specified.
Syntax
toCharArray(charArray, size)
Parameters
charArray char[]: destination char array
size int: destination char array size
Returns None
Usage Application
Updated on July 07, 2011 11:09:09pm PDT

Creative Commons License