コード例 #1
0
 public static string UnWrap(CharSequence csq)
 {
     if (csq == null)
     {
         throw new ArgumentException();
     }
     if (csq is CharSequenceProxy)
     {
         CharSequenceProxy proxy = (CharSequenceProxy)csq;
         StringProxy       sp    = proxy.Proxy as StringProxy;
         if (sp == null)
         {
             throw new ArgumentException();
         }
         return(sp.ToString());
     }
     else if (csq is StringProxy)
     {
         StringProxy sp = (StringProxy)csq;
         return(sp.ToString());
     }
     else
     {
         throw new ArgumentException();
     }
 }
コード例 #2
0
 public CharSequence SubSequence(int start, int end)
 {
     return(CharSequenceProxy.Wrap(_str.Substring(start, end - start)));
 }