Fandom

武装突袭 Wiki

SplitString

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 Share

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

Introduced with Arma 3 version 1.50
  

点击图片可看到更多讯息

开始使用于

游戏:
Arma 3
版本:
1.50

描述

描述:
An SQF version of C++ strtok. Splits given string str into an array of tokens according to given delimiters. In addition, if empty string "" is used for delimiters, str is split by each character.

基本句法

句法:
str splitString delimiters
参数:
str: String - A string to split

delimiters: String - one or more characters, each used as a separate delimiter.
返回值:
Array

范例

范例1:
_str = "- This, is a sample string." splitString "-,. "; // ["This","is","a","sample","string"] _str joinString " "; // "This is a sample string"

范例2:
"\A3\ui_f\data\map\vehicleicons\iconLogic_ca.paa" splitString "\."; // ["A3","ui_f","data","map","vehicleicons","iconLogic_ca","paa"]

范例3:
"1:2:3" splitString ":"; // ["1","2","3"]

范例4:
["test","test"] joinString toString [12345] splitString toString [12345]; // ["test","test"]

范例5:
"Japa is the best!" splitString "" joinString " "; // "J a p a i s t h e b e s t !"

范例6:
_cmd = currentMagazineDetail player; //"9mm 16Rnd Mag(13/16)[id/cr:10000011/0]" _cmd splitString "([ ]/:)"; //["9mm","16Rnd","Mag","13","16","id","cr","10000011","0"]

范例7:
Remove all \r\n from file:loadFile "somefile.txt" splitString toString [13,10] joinString " "

额外资讯

多人游戏:
-
也可以看看:

joinStringsetresizereverseselectinfindtoArrayforEachcountdeleteAtdeleteRangeappendsortparamparamsarrayIntersecttoStringUnicode Character Table

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Bottom Section

更多维基

随机维基