**This website will be shutdown permanently soon**

This website and apps are for sale. Only serious offers will be considered. Contact sales@paphussolutions.com

** Server is current under maintenance, any changes will be lost **

Help

how do i compare two words to see if they are the same word

tekijä bobstack Lähetetty Jan 29 2022, 5:36

how do i compare two words to see if they are the same word?


by admin posted Jan 29 2022, 8:22

In Self you can just use the == operator,

"hello" == "hello";
"hello" !="goodbye";
var word = "hello";
if (word == "hello") {
...

 

For the star variable is patterns use toString() first.

if (star.toString() == "hello") {
  ...

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1088, today: 255, week: 258, month: 272

by bobstack posted Jan 30 2022, 12:04

can i compare what is in two stars?

keyword = is a * a *


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1107, today: 261, week: 263, month: 279

by bobstack posted Jan 30 2022, 20:47

i forgot the understanding script could do this?


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1095, today: 253, week: 257, month: 269

by admin posted Jan 31 2022, 8:24

When a pattern has 2 stars the star variable is an array.

if (star[0] == star[1]) {
...

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1083, today: 266, week: 268, month: 285

Id: 41579659
Tunnisteet: programming
Lähetetty: Jan 29 2022, 5:36
Vastaukset: 4
Näkymät: 1095, Tänään: 262, Viikolla: 266, Kuukausi: 284
0 0 0.0/5