Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Copy of String.d

Go to the documentation of this file.
00001 
00002         class MutableString(T) : String!(T)
00003         {
00004                 // reset the content 
00005                 MutableString reset (T[] chars, bool mutable=true);
00006                 MutableString reset (String other, bool mutable=true);
00007 
00008                 // select a slice
00009                 MutableString select (uint start=0, uint length=uint.max);
00010 
00011                 // get the index of the current slice
00012                 uint start();
00013 
00014                 // move the slice around
00015                 bool seek (T c);
00016                 bool seek (T[] chars);
00017                 bool seek (String other);
00018                 bool rseek (T c);
00019                 bool rseek (T[] chars);
00020                 bool rseek (String other);
00021 
00022                 // append behind current slice
00023                 MutableString append (int value);
00024                 MutableString append (long value);
00025                 MutableString append (double value);
00026                 MutableString append (char[] other);
00027                 MutableString append (wchar[] other);
00028                 MutableString append (dchar[] other);
00029                 MutableString append (T chr, int count=1);
00030                 MutableString append (String other);
00031 
00032                 // format and layout behind current slice
00033                 MutableString format (T[] format, ...);
00034                 MutableString layout (T[] layout ...);
00035         
00036                 // insert before current slice
00037                 MutableString prepend (T[] other);
00038                 MutableString prepend (String other);
00039                 MutableString prepend (T chr, int count=1);
00040 
00041                 // replace current slice
00042                 MutableString replace (T chr);
00043                 MutableString replace (T[] other);
00044                 MutableString replace (String other);
00045 
00046                 // remove current slice
00047                 MutableString remove ();
00048 
00049                 // trim current slice
00050                 MutableString trim ();
00051 
00052                 // return content or current slice
00053                 T[] aliasOf (all = true);
00054         }
00055 
00056         class String(T) : UniString
00057         {
00058                 // iterate across string/slice
00059                 opApply (int delegate(inout T) dg);
00060 
00061                 // hash string/slice
00062                 uint toHash ();
00063 
00064                 // return length of string/slice
00065                 uint length ();
00066 
00067                 // compare string/slice
00068                 bool equals (T[] other);
00069                 bool equals (String other);
00070                 bool ends (T[] other);
00071                 bool ends (String other);
00072                 bool starts (T[] other);
00073                 bool starts (String other);
00074 
00075                 // copy string/slice
00076                 T[] copy (T[] dst);
00077                 T[] copy ();
00078         }
00079 
00080         class UniString
00081         {
00082                 // convert content
00083                 abstract char[]  utf8  (char[]  dst = null);
00084                 abstract wchar[] utf16 (wchar[] dst = null);
00085                 abstract dchar[] utf32 (dchar[] dst = null);
00086         }
00087 
00088         class AnonymousString : UniString
00089         {
00090                 //reset content
00091                 void set (char[] content);
00092                 void set (wchar[] content);
00093                 void set (dchar[] content);
00094         }

Generated on Sat Dec 24 17:28:32 2005 for Mango by  doxygen 1.4.0