String.c str()

出自YFRobotwiki
跳轉到: 導覽搜尋
String

c_str()


描述

Converts the contents of a string as a C-style, null-terminated string. Note that this gives direct access to the internal String buffer and should be used with care. In particular, you should never modify the string through the pointer returned. When you modify the String object, or when it is destroyed, any pointer previously returned by c_str() becomes invalid and should not be used any longer.


語法

string.c_str()


參數

none


返回值

A pointer to the C-style version of the invoking string.



返回String

返回Arduino語法參考列表

更多建議和問題歡迎反饋至 YFRobot論壇