Articles Posted by the Author:

  • [] (element access)

    [] (element access)

    Description Allows you access to the individual characters of a string. Syntax char thisChar = string1[n] Parameters thisChar (char) – a character variable string1 – a String variable n (int) – a numeric variable Returns the nth char of the string. Same as charAt(). Example - StringCharacters See also - String - charAt() Language Reference […]


  • trim()

    trim()

    Description Get a version of the String with any leading and trailing whitespace removed. trim() modifies the string in place rather than returning a new one. Syntax string.trim() Parameters string : a variable of type String Returns none Example - StringLengthTrim See also - String Language Reference Home The text of the 86Duino reference is […]


  • toUpperCase()

    toUpperCase()

    Description Get an upper-case version of a String. toUpperCase() modifies the string in place rather than returning a new one. Syntax string.toUpperCase() Parameters string : a variable of type String Returns none Example - StringCaseChanges See also - String - toLowerCase() Language Reference Home The text of the 86Duino reference is a modification of the […]


  • toLowerCase()

    toLowerCase()

    Description Get a lower-case version of a String. toLowerCase() modifies the string in place rather than returning a new one. Syntax string.toLowerCase() Parameters string : a variable of type String Returns none Example - StringCaseChanges See also - String - toUpperCase() Language Reference Home The text of the 86Duino reference is a modification of the […]


  • toInt()

    toInt()

    Description Converts a valid String to an integer. The input string should start with an integral number. If the string contains non-integral numbers, the function will stop performing the conversion. Syntax string.toInt() Parameters string : a variable of type String Returns long (If no valid conversion could be performed because the string doesn’t start with […]


  • toCharArray()

    toCharArray()

    Description Copies the string’s characters to the supplied buffer. Syntax string.toCharArray(buf, len) Parameters string : a variable of type String buf : the buffer to copy the characters into (char []) len : the size of the buffer (unsigned int) Returns None See also - String - getBytes() Language Reference Home The text of the […]


  • substring()

    substring()

    Description Get a substring of a String. The starting index is inclusive (the corresponding character is included in the substring), but the optional ending index is exclusive (the corresponding character is not included in the substring). If the ending index is omitted, the substring continues to the end of the String. Syntax string.substring(from) string.substring(from, to) […]


  • startsWith()

    startsWith()

    Description Tests whether or not a String starts with the characters of another String. Syntax string.startsWith(string2) Parameters string : a variable of type String string2 : another variable of type String Returns true: if string starts with the characters of string2 false: otherwise Example - StringStartsWithEndsWith See also - String - endsWith() Language Reference Home […]


  • setCharAt()

    setCharAt()

    Description Sets a character of the String. Has no effect on indices outside the existing length of the String. Syntax string.setCharAt(index, c) Parameters string : a variable of type String index : the index to set the character at c : the character to store to the given location Returns None See also - String […]


  • reserve()

    reserve()

    Description The String reserve() function allows you to allocate a buffer in memory for manipulating strings. Syntax string.reserve(size) Parameters string : a variable of type String size : unsigned int declaring the number of bytes in memory to save for string manipulation Returns none Example See also - String Language Reference Home The text of […]