“String - object”的版本间的差异

来自YFRobotwiki
跳转至: 导航搜索
(以“ {| border="0" cellpadding="10" width="100%" |- |width="30%" valign="top" align="left"| <font color="orange" size="+1">'''描述'''</font> <br> <br> The String cla...”为内容创建页面)
 
 
第44行: 第44行:
  
  
:-[[ string]]: character arrays  
+
:-[[ String - char array| string]]: character arrays  
  
:-[[ Variable Declaration]]
+
:-[[ Variables| Variable Declaration]]
  
  
第56行: 第56行:
 
<font color="orange" size="+1">'''函数'''</font><br>
 
<font color="orange" size="+1">'''函数'''</font><br>
 
<br>
 
<br>
:-[[String-String()| String()]]
+
:-[[String - String()| String()]]
  
 
:-[[String.charAt()| charAt()]]
 
:-[[String.charAt()| charAt()]]

2015年7月27日 (一) 16:46的最后版本


描述

The String class, part of the core as of version 0019, allows you to use and manipulate strings of text in more complex ways than character arrays do. You can concatenate Strings, append to them, search for and replace substrings, and more. It takes more memory than a simple character array, but it is also more useful.

For reference, character arrays are referred to as strings with a small s, and instances of the String class are referred to as Strings with a capital S. Note that constant strings, specified in "double quotes" are treated as char arrays, not instances of the String class.


示例


- StringConstructors
- StringAdditionOperator
- StringIndexOf
- StringAppendOperator
- StringLengthTrim
- StringCaseChanges
- StringReplace
- StringRemove
- StringCharacters
- StringStartsWithEndsWith
- StringComparisonOperators
- StringSubstring



另请参阅


- string: character arrays
- Variable Declaration


函数

- String()
- charAt()
- compareTo()
- concat()
- c_str()
- endsWith()
- equals()
- equalsIgnoreCase()
- getBytes()
- indexOf()
- lastIndexOf()
- length()
- remove()
- replace()
- reserve()
- setCharAt()
- startsWith()
- substring()
- toCharArray()
- toInt()
- toFloat()
- toLowerCase()
- toUpperCase()
- trim()



运算符

- [] (element access)
- + (concatenation)
- += (append)
- == (comparison)
- > (greater than)
- >= (greater than or equal to)
- < (less than)
- <= (less than or equal to)
- != (different from)





返回Arduino语法参考列表

更多建议和问题欢迎反馈至 YFRobot论坛