s c h e m a t i c s : c o o k b o o k

/ WebHome / TOC / Cookbook.StringRecipesOld

This Web


WebHome 
WebChanges 
TOC (with recipes)
NewRecipe 
WebTopicList 
WebStatistics 

Other Webs


Chicken
Cookbook
Erlang
Know
Main
Plugins
Sandbox
Scm
TWiki  

Schematics


Schematics Home
Sourceforge Page
SchemeWiki.org
Original Cookbook
RSS

Scheme Links


Schemers.org
Scheme FAQ
R5RS
SRFIs
Scheme Cross Reference
PLT Scheme SISC
Scheme48 SCM
MIT Scheme scsh
JScheme Kawa
Chicken Guile
Bigloo Tiny
Gambit LispMe
GaucheChez

Lambda the Ultimate
TWiki.org

String Recipes

Introduction

A string is a sequence of characters. A string is written by enclosing the characters with a doublequote ("). Some special characters must be preceded by a backslash, these include doublequote and backslash. The technique of marking special characters are called escaping and backslash it self is called an escape character.

Examples of literal strings:

   "Hello world"
   "This string has a \" in it"
   "This character \\ is a slash"

In Scheme, strings are sequences of characters. Since you can't talk about strings without talking about characters, you should know that mzScheme supports the Basic Latin and Latin-1 Supplement, AKA ISO-8859-1. There's work being done to extend the range of valid characters, but at the moment this is what's available. You can specify a literal character with the sequence #\ followed by the character, i.e.

> #\A
#\A
> #\a
#\a
> #\*
#\*

Recipes

Other recipes of interest

References

Comment the recipes here

See the String section of the CommonLispCookBook for inspiration for more recipes.

Contributors

-- JensAxelSoegaard

-- GordonWeakliem - 05 Apr 2004

-- BrentAFulgham - 18 May 2004

CookbookForm
TopicType: Orphan
ParentTopic:
TopicOrder:

 
 
Copyright © 2004 by the contributing authors. All material on the Schematics Cookbook web site is the property of the contributing authors.
The copyright for certain compilations of material taken from this website is held by the SchematicsEditorsGroup - see ContributorAgreement & LGPL.
Other than such compilations, this material can be redistributed and/or modified under the terms of the GNU Lesser General Public License (LGPL), version 2.1, as published by the Free Software Foundation.
Ideas, requests, problems regarding Schematics Cookbook? Send feedback.
/ You are Main.guest