GDL
About building parametric objects with GDL.
SOLVED!

Is there a function in GDL to find a specific character in a sentence?

LeeJaeYoung
Virtuoso

Is there a function in GDL to find a specific character in a sentence?
(I am trying to find out if there is a letter "am" in the sentence "I am a boy.")

AC27 on window 11
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Miha Nahtigal
Advocate

STRSTR (string_expression1, string_expression2[, case_insensitivity])
Returns the (integer) position of the first appearance of the second string in the first string. If the first string doesn’t contain the second one,
the function returns 0.
Note: In case string_expression2 is an empty string, the function returns 1.
case_insensitivity:
0 or not set: Case sensitive
1: Case insensitive

BIMquants.comBETA - Quantities and Costs Estimation in Archicad - BETA testers needed.

View solution in original post

2 REPLIES 2
Solution
Miha Nahtigal
Advocate

STRSTR (string_expression1, string_expression2[, case_insensitivity])
Returns the (integer) position of the first appearance of the second string in the first string. If the first string doesn’t contain the second one,
the function returns 0.
Note: In case string_expression2 is an empty string, the function returns 1.
case_insensitivity:
0 or not set: Case sensitive
1: Case insensitive

BIMquants.comBETA - Quantities and Costs Estimation in Archicad - BETA testers needed.

Thank you so much

ns = STRSTR ("I am a Boy", "am")
return 3

AC27 on window 11

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!