[pure-lang-svn] SF.net SVN: pure-lang:[841] pure/trunk/lib/strings.pure
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-09-23 18:59:59
|
Revision: 841 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=841&view=rev Author: agraef Date: 2008-09-23 18:56:29 +0000 (Tue, 23 Sep 2008) Log Message: ----------- Add missing string conversion routines. Modified Paths: -------------- pure/trunk/lib/strings.pure Modified: pure/trunk/lib/strings.pure =================================================================== --- pure/trunk/lib/strings.pure 2008-09-23 13:01:30 UTC (rev 840) +++ pure/trunk/lib/strings.pure 2008-09-23 18:56:29 UTC (rev 841) @@ -157,6 +157,14 @@ stream s::string = stream (chars s); tuple s::string = tuple (chars s); +string [] = ""; +string xs@(_::string:_) = strcat xs if all stringp xs; + +/* Conversions between strings and matrices. */ + +matrix s::string = matrix (chars s); +string x::matrix = string (list x) if all stringp x; + /* Define the customary list operations on strings, so that these can mostly be used as if they were lists. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |