BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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 with Archicad AddOn :: rushing to publish a beta preview

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 with Archicad AddOn :: rushing to publish a beta preview

Thank you so much

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

AC27 on window 11
Learn and get certified!

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!