fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 39: Check if string contains a word
Idiom # 39: Check if string contains a word
See
programming-idioms.org
:
Code
ok := s.contains word
What are effects?
Running Example
ex39 is check_contains(s String, word String) => ok := s.contains word say "'$s'.contains '$word' is $ok" check_contains "Fuzion" "zia" check_contains "Fuzion" "tío" check_contains "Fuzion" "zio" check_contains "Fuzion" "mio"
What are effects?
last changed: 2024-07-01
next: Idiom # 40: Graph with adjacency lists