00001
00002 class MutableString(T) : String!(T)
00003 {
00004
00005 MutableString reset (T[] chars, bool mutable=true);
00006 MutableString reset (String other, bool mutable=true);
00007
00008
00009 MutableString select (uint start=0, uint length=uint.max);
00010
00011
00012 uint start();
00013
00014
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
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
00033 MutableString format (T[] format, ...);
00034 MutableString layout (T[] layout ...);
00035
00036
00037 MutableString prepend (T[] other);
00038 MutableString prepend (String other);
00039 MutableString prepend (T chr, int count=1);
00040
00041
00042 MutableString replace (T chr);
00043 MutableString replace (T[] other);
00044 MutableString replace (String other);
00045
00046
00047 MutableString remove ();
00048
00049
00050 MutableString trim ();
00051
00052
00053 T[] aliasOf (all = true);
00054 }
00055
00056 class String(T) : UniString
00057 {
00058
00059 opApply (int delegate(inout T) dg);
00060
00061
00062 uint toHash ();
00063
00064
00065 uint length ();
00066
00067
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
00076 T[] copy (T[] dst);
00077 T[] copy ();
00078 }
00079
00080 class UniString
00081 {
00082
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
00091 void set (char[] content);
00092 void set (wchar[] content);
00093 void set (dchar[] content);
00094 }