Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 23-Mar-2013 14:54:22

Alexandre_Brazil
Member
Registered: 8-Dec-2011
Posts: 227

Extracting substring from a string

Is there any PlugIT that I can use to extract a sub string of a larger chain of string?

Thank you for your cooperation.

Offline

#2 23-Mar-2013 15:33:02

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: Extracting substring from a string

Hello,

What extraction ?
Between two positions ?
From a position with a specific length ?
A predefined word (if present) ?
After / before another sub string ?
From a regular expression ?
Other things ?

There are a lot of cases smile

Offline

#3 25-Mar-2013 00:29:21

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: Extracting substring from a string

Alexandre I think I did string slicing/finding substrings here:
http://www.scolring.org/forum/viewtopic.php?id=514

-h

Offline

#4 25-Mar-2013 13:24:00

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: Extracting substring from a string

hebdemnobad, have you make a such plugit ?

Offline

#5 25-Mar-2013 19:38:30

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: Extracting substring from a string

this kind of plugIT could be helpfull but this is hard to make something generic.

in the next OS3D release you will be able to replace or reorder a link parameter with $1 in param.

for example :
out("hello world")->log.print
could have in parameter "$1 the $2" and print "hello the world"

or a param like a vector "0.0 1.0 -1.0"
could get "$1" for x
or "$2 $1 $3" to revert some params

Offline

#6 27-Mar-2013 16:29:17

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: Extracting substring from a string

iri wrote:

hebdemnobad, have you make a such plugit ?

I used the slicing and finding functions to figure identify certain messages sent to the java server from other clients, and once these messages (an obscure sequence of characters that no one would enter into their chat input) come to other clients, the other clients would move avatars around.

Offline

#7 4-Apr-2013 20:19:50

Alexandre_Brazil
Member
Registered: 8-Dec-2011
Posts: 227

Re: Extracting substring from a string

Thanks for all will help, the problem was solved

Offline

Board footer

Powered by FluxBB