在 arduino裡 要擷取字串
請用 substring()
例如:substring() with only one parameter looks for a given substring from the position given to the end of the string. It expects that the substring extends all the way to the end of the String. For example:
String stringOne = "Content-Type: text/html";
// substring(index) looks for the substring from the index position to the end: if (stringOne.substring(19) == "html") {
}
================================================================================
substring() with two parameters looks for a given substring from the first parameter to the second. For example:
String stringOne = "Content-Type: text/html";
// you can also look for a substring in the middle of a string: if (stringOne.substring(14,18) == "text") {