[procedure] string-ref string k
In R6RS, it is noted that an implementation should make string-ref run in constant time. It is "should", so it doesn't exclude implementations that uses multibyte strings or structured strings like ropes, but such implementations should keep in mind that portable R6RS libraries may rely on the O(1) string-ref to implement some string algorithms.
R6RS has string-for-each, which would be a better choice to process a string seqentially and avoid variations in string access time.
See also string-set!.
About This Site
Concept:CaseSensitivity Concept:DocumentationFormat Concept:ExtendedLambdaList Concept:FileSystem Concept:FindAndAnyInCollection Concept:ForeignInterface Concept:HashTable Concept:Module Concept:Networking Concept:ObjectSystem Concept:Process Concept:RegularExpression Concept:UserGroup