【问题标题】:iPhone-SDK: Remove uneccessary white spaces from big paragraph string?iPhone-SDK:从大段落字符串中删除不必要的空格?
【发布时间】:2009-09-15 10:29:53
【问题描述】:

我想从下面提到的大段落字符串中删除不必要的空格。

我尝试通过 stringByTrimmingCharactersInSet 删除它并使用 replaceOccurrencesOfString 等。没有成功。有人可以看看我的段落字符串并提供代码 sn-p 可以替换所有不必要的空格并使其值得一读。

段落字符串从下面开始 ------------------------------------------

         World wealth down 11 pct, fewer millionaires - report 





     Top News 





 World wealth down 11 pct, fewer millionaires - report 
 11:29 AM IST 





     By Joe Rauch 

     NEW YORK (Reuters) - The 2008 global recession caused the first worldwide contraction in assets under management in nearly a decade, according to a study that found wealth dropped 11.7 percent to $92.4 trillion. 

     A return to 2007 levels of wealth will take six years, according to a Boston Consulting Group study that examined assets overseen by the asset management industry. 

     North America, particularly the United States, was the hardest hit region, reporting a 21.8 percent decline in wealth firms' assets under management to $29.3 trillion, primarily because of the beating U.S. equities investments took in 2008. 

     Also hit hard were off-shore wealth centers, like Switzerland and the Caribbean, where assets declined to $6.7 trillion in 2008 from $7.3 trillion in 2007, an 8 percent drop. 

     The downturn has "shattered confidence in a way we have not seen in a long time," said Bruce Holley, senior partner and managing director at BCG's New York office. 

     The study forecasts that wealth management firms' assets under management will not return to 2007 levels, $108.5 trillion, until 2013, a six-year rebound. 

     Europe posted a slightly higher $32.7 trillion of assets under management, edging out North America for the wealthiest region, though the total wealth in region dropped 5.8 percent. 

     Latin America was the only region to report a gain in assets under management, posting a 3 percent uptick from $2.4 trillion in 2007 to $2.5 trillion in 2008. 



     MILLIONAIRE ... NOT 

     The economy's retreat also pounded millionaires who made risky investments during the economic boom. 

     The number of millionaires worldwide shrank 17.8 percent to 9 million, the BCG study found. 

     Europe and North America were hardest hit in that regard, posting 22 percent declines. The United States still boasts 3.9 million millionaires, the highest population on the globe. 

     Singapore had the highest density of millionaires at 8.5 percent of the population. Other countries included Switzerland, at 6.6 percent, Kuwait, at 5.1 percent, United Arab Emirates, at 4.5 percent, and the United States, at 3.5 percent. 

----------------- 段落字符串在上面结束 ------------------------- ------------

【问题讨论】:

    标签: iphone cocoa


    【解决方案1】:

    请查看我对您之前相同问题的回答:

    iPhone-SDK:Remove white spaces from a paragraph string?

    【讨论】:

      猜你喜欢
      • 2010-11-28
      • 2018-07-21
      • 1970-01-01
      • 2014-07-14
      • 2014-12-25
      • 1970-01-01
      • 2020-10-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多