Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Counting occurences of substring in string
proc string_occurrences {needleString haystackString} { regsub -all $needleString $haystackString {} stripped expr {([string length $haystackString] - [string length $stripped]) / [string length $needleString]} } set haystack "foo foo bar" set needle "foo" puts [string_occurrences $needle $haystack]
run
|
edit
|
history
|
help
0
Convert a collection to a list
Perfect bin mul eo float
code to identify whether particular coordinate lies in bbox
test
Different factorial implementations
wewew
a
Perfect binary mul and even odd assign 2
dssd
Longest common subsequence