Kuifje support for strings.
The way to create a string in kuifje follows.
x = "value";
And its output of the variable "x" is given below:
Probability of the distribution happen | Distribution | Value |
---|---|---|
1.00 | 1.00 | "value" |
Verifies if a value is equal to other.
Program:
x = "right";
y = "wrong";
z = x == y;
Output of variable z:
Probability of the distribution happen | Distribution | Value |
---|---|---|
1.00 | 1.00 | False |
Verifies if a value is different of other.
Program:
x = "right";
y = "wrong";
z = x != y;
Output of variable z:
Probability of the distribution happen | Distribution | Value |
---|---|---|
1.00 | 1.00 | True |
This function takes two strings, returnings True if the characters of the first string occurs, in order, in the second. The characters do not have to be consecutively placed.
Program:
x = "ali";
y = "valid";
z = x strIsSub y;
Output of variable z:
Probability of the distribution happen | Distribution | Value |
---|---|---|
1.00 | 1.00 | True |
Program:
x = "ai";
y = "valid";
z = x strIsSub y;
Output of variable z:
Probability of the distribution happen | Distribution | Value |
---|---|---|
1.00 | 1.00 | True |
Program:
x = "ia";
y = "valid";
z = x strIsSub y;
Output of variable z:
Probability of the distribution happen | Distribution | Value |
---|---|---|
1.00 | 1.00 | False |