Last active
March 23, 2016 19:16
-
-
Save alarsyo/1cd62ca4eb5ef458e67e to your computer and use it in GitHub Desktop.
String tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yourstring.[i] ;; (* retourne le caractère de rang i de ta chaîne de caractères *) | |
"exemple".[4] ;; | |
(* - : char = 'p' *) | |
(* le rang va de 0 à (n-1), attention ! *) | |
String.make n char ;; (* construit à partir de ton caractère char une string longue de n caractères *) | |
String.make 1 'e' ;; | |
(* - : string = "e" *) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment