SketchyLISP Reference |
Copyright (C) 2006 Nils M Holm |
<<[string-length] | [Index] | [string<?]>> |
Conformance: R5RS
Purpose: Extract the n'th char of a string. The first char is at position 0.
Arguments:
X - string
N - position of char to extract
Model:
(define (string-ref x n) (list-ref (string->list x) n))
Implementation:
; This function is a primitive function.
Example:
(string-ref "abcdef" 2) => #\c
See also:
string,
string-length,
string-ref,
substring.
<<[string-length] | [Index] | [string<?]>> |