随笔-295  评论-26  文章-1  trackbacks-0
package org.igniterealtime.xiff.util
{
 //import mx.formatters.DateFormatter;
 public class Util
 {
  public function Util()
  {
  }
        public static function getNowDateFormat():String{         
          return (new Date().toTimeString().substr(0,8));
    }  
  public static function getGenerate():String{
       var i:int=Math.random()*99;
       return i.toString();
      }
    public static function trim(str:String):String
      {
           var myPattern:RegExp = /</g;
    str=str.replace(myPattern, "");     
    if (str == null) return '';
          var startIndex:int = 0;
          while (isWhitespace(str.charAt(startIndex)))
              ++startIndex;
  
          var endIndex:int = str.length - 1;
          while (isWhitespace(str.charAt(endIndex)))
              --endIndex;
  
          if (endIndex >= startIndex)
              return str.slice(startIndex, endIndex + 1);
          else
              return "";
      }
 public static function isWhitespace(character:String):Boolean
      {
          switch (character)
          {
              case " ":
              case "\t":
              case "\r":
              case "\n":
              case "\f":
                  return true;
  
              default:
                  return false;
          }
      }
   
    }
 
}

大盘预测 国富论
posted on 2008-09-24 09:42 华梦行 阅读(259) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: