boolean - contains(string str)
如果字串包含特定序列或字元返回true
boolean- endswith(string str)"fx is great".contains("fx")
true
檢測是否以特定字串結尾
boolean-satrtswith(string regex)"fx is great".endswith("great")
true
檢測是否以特定字串開頭
string- concat(string str)"fx is great".startswith("fx")
true
將指定的字串,此字串的末尾。
int- indexof(object o,)"fx is great".concat("!!!")
fxis
great!!
!
返回從指定位置起,第乙個匹配字串的位置
boolean- isempty()"fx is excellent in crm"
.indexof("i",7)
16
判斷是否為空
int-compareto(object o)"fx".isempty()
false
比較,大於比較引數返回1,小於返回-1,等於返回0
int-length()2.compareto(3)
-1
返回字串長度
string-replace(string target,string replacement)"fexiaoke".length()
8
替換指定字串
list-split(string regx)"fexiaoke is great".replace("fexiaoke","fs")
fs is great
將此字串按regex分割為list。
string-substring(int beginindex,int endindex)"fx welcome you".split(" ")
[fx, welcome, you]
子字串以指定索引處的字元開頭和結尾
boolean-add(,e e)"fxiaoke"
.substring(2,5)
iao
向集合新增元素
boolean-addall(collectionlist = [1,2,3]
list.add(4)
void-clear()list1 =[1,2,3]
list2 =[4,5]
list1.addall(list2)
清空值
boolen-contains(object o)list = [1,2,3]
list.clear()
判斷是否包含匹配內容
list.contains(1)
true
boolean-containsall(collection
boolean-equals(object o)list = [1,2,3]
list.containsall([1,4])
false
判斷是否相等
e-get(int index)"1".equals(1)
false
獲取集合指定位置元素
list.get(0)
1int-hashcode()
返回此列表的雜湊碼值
indexof-(object 0)list = [1,2,3]
list.hashcode()
30817
返回指定元素位置
boolean-isempty()"qweeqwe"
.indexof("w")
1
判斷是否為空
e- remove(int index)
移除指定位置的元素
e- remove(object o)
移除指定元素
boolean-removeall(collection
int-size()
返回集合元素個數
v- putifvbsent(k key,v value)
如果key存在的情況下,在putifvbsent下不會修改
void-clear()map
map = new hashmap()
map.putifabsent("1",1)
map.putifabsent("2",2)
map.put("1",2)
map.putifabsent("2",3)
print map.tostring()
[1:2, 2:2]
清空map
boolean-containskey(object key)
是否包含key
boolean-containsvalue(object value)map
.containskey("3")
false
是否包含value
v-get(object key)
以鍵取值
v-put(k key,v value)
存放k-v
void-putall(map m)
存放乙個map
v-remove(object key)
按鍵移除指定k-v,返回移除的key
boolean-remove(object key, object value)map.remove("1")
2
移除指定的k-v,沒有返回false
int-size()map.remove("1",2)
true
返回map元素個數
collection- values()
返回所有值的集合
map.values().tostring()
[2,2]
API函式宣告
在vb中,如何宣告函式呢?我想,如果你正在看此文,那麼你絕對能夠回答得出這個問題。以下便是你應該很熟悉的函式宣告 function setfocus byval hwnd as long as long 即,這行 定義了名為setfocus的函式,此函式具有乙個long型資料型別的引數,並按值傳遞 ...
常用 API 函式 選單函式
在指定的選單裡新增乙個選單項 checkmenuitem 複選或撤消複選指定的選單條目 checkmenuradioitem 指定乙個選單條目被複選成 單選 專案 createmenu 建立新選單 createpopupmenu 建立乙個空的彈出式選單 deletemenu 刪除指定的選單條目 de...
API視窗控制代碼函式
findwindow lpclassname,lpwindowname pchar hwnd findwindowex parent hwnd child hwnd classname pchar windowname pchar hwnd getclassname hwnd hwnd lpclas...