国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
C# 單詞反轉(zhuǎn)
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
  
 namespace ReverseWord {
     class Program
     {
        static string Revert(string target)
       {
           if (target == null || target == string.Empty)
           {
               throw new ArgumentException "Error:Can not revert empty string! Please enter input like this:How are you?";
           }

           // clear blank both end!
           char blank = ' ';
           if (target.StartsWith(blank.ToString()))
               target = target.Trim();

           StringBuilder builder = new StringBuilder();
           int i = target.Length - 1;
           int j = target.Length - 1;
           if (char.IsPunctuation(target[target.Length - 1]))
           {
               i = target.Length - 2;
               j = target.Length - 2;
           }

           while (j > 0)
           {
               if (target[j] == blank)
               {
                   builder.Append(target.Substring(j + 1, i - j));
                   builder.Append(blank.ToString());
                   i = j - 1;
               }
               j--;
           }

           builder.Append(target.Substring(j, i 
+ 1));

           if (char.IsPunctuation(target[target.Length - 1]))
               builder.Append(target[target.Length - 1].ToString());

           return builder.ToString();
       }
   }
}
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
asp.net文章內(nèi)容分頁(yè)代碼(手動(dòng)設(shè)置法)
java版本的escape和unescape函數(shù)
U3d內(nèi)存優(yōu)化(一)之UILabel使用String的問(wèn)題
字符串操作工具 StringTools
Java筆記(四String和StringBuffer)
5-8undefined迭代語(yǔ)句之foreach語(yǔ)句
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服