Fandom

武装突袭 Wiki

Strings

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

General

File Commands

O2 Comref


"string" find/findi "what"编辑

returns offset to start of string

Example:

   "one two three" findi "TWO" , result is 4

yes. well, big deal. what's NOT documented is when it can't be found for shite's sake

answer = nil

thus a fairly straightforward

if ( (somestring findi "nothere") < 0) will fail, it's always there because it's NIL (jesus)

(>=0 will work)

note to self, some would-be language makers should read the perl cookbook which states fairly early on

" we take some things to be self evident"


string @ idx编辑

Example:

   "Hello" @ 2 , result is "l"

string @ [from,to]编辑

returns a substr

Example:

   "Hello world" @ [2,7] , result is llo w


str AnyThing编辑

returns "whatever anything is"

example:

str _thing;

String strCmp String编辑

returns standard c strcmp()

case insensitive equivalent ==

(tolower String) strCmp (tolower String)

i've put brackets round this because in this language, the use of them is un-intuitive and NEVER self evident. Sometimes their use is contradictory

if you need bullet proof, (everything) sigh


note, case sensitive unfortunately

tolower编辑

toupper编辑

tolower string;

std c functions

example

_val= "this" strcmp tolower"tHiS";

更多维基

随机维基