home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Contain Function?

by MisanthropX on 10/22/2008 16:14, 3 messages, last message: 10/23/2008 00:09, 1050 views, last view: 04/16/2024 10:53

Hi guys im looking for a "function" that you can ask if a letter or smth else in a word(not at N S)
or is there a way to make a word to a "list"? so i can work with the at function

with this function there could be cool filter .. like mh.. all ppl who contains some special letters get auto kick..(you can create a blacklist) and its also usefull for many other things.

well is there a function you can make a word into single letters? (for example: m X | M i s a n t h r o p x)
or asking if a word contains smth?

that would be cool..

thanks and hf > misa

   Board Index   

#1: ..

by MovingTarget on 10/22/2008 20:09

You mean something sorta like strstr or str.find()? Or are you talking CubeScript?

Or am I totally missing what you're after?

reply to this message

#2: ..

by -Redon- on 10/22/2008 20:29

he means cubescript, the (at L N) command selects the Nth element out of a list L (for example "10 20 372 19 b")

a space in a list marks the beginning of a new element, but he wants to check a word for signs, for example he wants to check if the word "sauer" is contained in the word "sauerbraten", and to do that, he wants to split the word into single letters. That makes it possible to check the letters with the (at...) command

I dont think there is such a command yet, but would be cool :)

reply to this message

#3: Re: ..

by Hirato Kirata on 10/23/2008 00:09, refers to #2

there is a strstr cubescript command :P

say if the list was
list = "sauerbraten eisenstern"
if he typed (strstr $list sauer), 0 would be returned, which is the same as false
if he typed (strstr $list saeur) (in other words, he misspelled sauer), -1 would be returned as it doesn't exist in the string

so for true you'd want to use
(>= (strstr $list sauer) 0)

among other commands I've yet to learn using, there is an strreplace, and a substr

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53863019 visitors requested 71638127 pages
page created in 0.020 seconds using 10 queries
hosted by Boost Digital