OCaml
How does one index/split/splice strings in OCaml like we do in Python?
Learning
rene_sax
November 9, 2019, 12:51am
1
I want to do:
"abc"[1:2]
to get
"bc"
Chet_Murthy
November 9, 2019, 2:06am
2
# String.sub "abc" 1 2 ;; - : string = "bc"
Related topics
Topic
Replies
Views
Activity
Just reinvented OOP
Learning
7
1422
September 1, 2021
String manipulation
Learning
ocaml
9
5184
January 23, 2020
Substring of Unicode string including newlines in Windows
Ecosystem
windows
,
unicode
22
1795
September 27, 2021
Could we move string and bytes to sliced types?
Ecosystem
language
27
776
December 31, 2024
Calling functions by a string variable?
Learning
1
1144
August 11, 2017