- string-take string ncharsprocedure
- string-drop string ncharsprocedure
- string-take-right string ncharsprocedure
- string-drop-right string ncharsprocedure
string-take returns a string containing the first nchars of string; string-drop returns a string containing all but the first nchars of string. string-take-right returns a string containing the last nchars of string; string-drop-right returns a string containing all but the last nchars of string.
(string-take "Pete Szilagyi" 6) ⇒ "Pete S" (string-drop "Pete Szilagyi" 6) ⇒ "zilagyi" (string-take-right "Beta rules" 5) ⇒ "rules" (string-drop-right "Beta rules" 5) ⇒ "Beta "
It is an error to take or drop more characters than are in the string:
(string-take "foo" 37) ⇒ ;; error