亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? numberformat.as

?? actionscript3 cookbook 源代碼S3CBLibrary
?? AS
?? 第 1 頁 / 共 2 頁
字號:
              sNumber += aPart1[i];
            }
          }
        }
      }

      // Return the number string.
      return sNumber;
    }

    /**
     *  Format a number as currency. This method works very similarly to the 
     *  standard format( ) method.
     *  <p>
     *  Example usage: <br />
     *  trace(nfFormatter.currencyFormat(1000)); // Displays $1,000.00 <br />
     *  trace(nfFormatter.currencyFormat(1000, new Locale("fr")));  // Displays: 1.000,00€ <br />
     *  trace(nfFormatter.currencyFormat(1000, {group: "|", decimal: "%", before: true, currency: "^"}));  // Displays: ^1|000%00 <br />
     *  </p>
     *  to the nearest of a specified interval.
     *  @param  number          The number you want to format.
     *  @param  locale          (optional) A Locale object.
     *  @param  symbols object  (optional) An object specifying the group, decimal, and currency symbols.
     *                          Can also include a before (Boolean) property specifying whether or not
     *                          ths currency symbol should be placed at the beginning or end.
     *  @return                 The formatted number as a string.
     */
    public function currencyFormat(nAmount:Number, oParameter1:Object = null):String {

      // If the locale is passed to the method, use that. Otherwise, create a new,
      // default Locale object.
      var lStyle:Locale = (arguments[1] is Locale) ? arguments[1] : new Locale();

      // If the symbols object is passed to the method, use that. Otherwise, retrieve
      // the symbols object based on the locale.
      if(oParameter1 != null && oParameter1.hasOwnProperty("group")) {
        var oSymbols:Object = oParameter1;
      }
      else {
        var oSymbols:Object = getSymbols(true, lStyle);
      }

      var sCurrencySymbol:String = oSymbols.currency;
      var sGroup:String = oSymbols.group;
      var sDecimal:String = oSymbols.decimal;
      var sTempMask:String = _sMask;
      _sMask = null;

      // Create a Locale object that uses US formatting, then format the
      // amount using that locale.
      var lLocale:Locale = new Locale();
      lLocale.language = "en";
      lLocale.variant = "US";
      var sAmount:String = format(nAmount, lLocale);  
      _sMask = sTempMask;

      // Split the formatter string into parts using the dot as the
      // delimiter.
      var aParts:Array = sAmount.split(".");

      // If there were no decimal places, use a default of 00. Otherwise,
      // Round the decimal places to two.
      if(aParts[1] == undefined) {
        aParts[1] = "00";
      }
      else {
        aParts[1] = Number(aParts[1]);
        var nPart1Length:Number = String(aParts[1]).length;
        if(nPart1Length > 2) {
          aParts[1] /= Math.pow(10, (nPart1Length - 2));
          aParts[1] = Math.round(aParts[1]);
        }
      }

      // Join the parts pack to a new string. Then split that into an array
      // of characters.
      sAmount = aParts.join(".");
      var aAmount:Array = sAmount.split("");

      // Loop through each of the elements of the array, and replace commas
      // with the appropriate grouping symbol and dots with the appropriate
      // decimal marker.
      for(var i:Number = 0; i < aAmount.length; i++) {
        if(aAmount[i] == ",") {
          aAmount[i] = sGroup;
        }
        else if(aAmount[i] == ".") {
          aAmount[i] = sDecimal;
        }
      }

      // Add the current symbol.
      var sReturnString:String = ((oSymbols.before) ? sCurrencySymbol : "") + aAmount.join("") + ((!oSymbols.before) ? sCurrencySymbol : "");

      // Return the string.
      return sReturnString;
    }

    /**
     *  Parse a string to a number. Numbers can be parsed using localized
     *  settings.
     *  <p>
     *  Example usage: <br />
     *  trace(nfFormatter.currencyFormat(1000)); // Displays $1,000.00 <br />
     *  trace(nfFormatter.currencyFormat(1000, new Locale("fr")));  // Displays: 1.000,00€ <br />
     *  trace(nfFormatter.currencyFormat(1000, {group: "|", decimal: "%", before: true, currency: "^"}));  // Displays: ^1|000%00 <br />
     *  </p>
     *  to the nearest of a specified interval.
     *  @param  number          The number string you want to parse.
     *  @param  radix           (optional) The radix to use when parsing the string. 10 is the default.
     *  @param  currency        (optional) A Boolean indicating whether or not the number string is formatted
     *                          as currency. The default is false.
     *  @param  locale          (optional) A Locale object.
     *  @return                 The number.
     */
    public function parse(sNumber:String, nRadix:Number, bCurrency:Boolean, lStyle:Locale):Number {

      // If the locale parameter is unspecified, use a default Locale object.
      if(lStyle == null) {
        lStyle = new Locale();
      }

      // Get the symbols.
      var oSymbols:Object = getSymbols(bCurrency, lStyle);

      // Split the string into an array of characters.
      var aCharacters:Array = sNumber.split("");

      // If the radix is undefined then use default radix interpretation.
      if(isNaN(nRadix)) {

        // If the first two characters are 0x, use a radix of 16. If the
        // first character is 0, use a radix of 8. If the first character
        // is a # then use a radix of 16. Otherwise use the default radix of
        // 10.
        if(aCharacters[0] == "O") {
          if(aCharacters[1] == "x") {
            nRadix = 16;
          }
          else {
            nRadix = 8;
          }
        }
        else if(aCharacters[0] == "#") {
          nRadix = 16;
        }
        else {
          nRadix = (isNaN(nRadix)) ? 10 : nRadix;
        }
      }

      // Loop through each character. If the character is a digit, don't do anything.
      // If the character is a decimal point, replace it with a dot. If the radix
      // Is greater than 10, allow alphabetic characters to remain. Otherwise, remove
      // the character from the array.
      for(var i:Number = 0; i < aCharacters.length; i++) {
        switch(aCharacters[i]) {
          case "0":
          case "1":
          case "2":
          case "3":
          case "4":
          case "5":
          case "6":
          case "7":
          case "8":
          case "9":
            break;
          case oSymbols.decimal:
            aCharacters[i] = ".";
            break;
          default:
            if(nRadix > 10) {
              if((aCharacters[i].charCodeAt(0) > 64 && aCharacters[i].charCodeAt(0) < 91) || (aCharacters[i].charCodeAt(0) > 96 && aCharacters[i].charCodeAt(0) < 123)) {
                break;
              }
            }
            aCharacters.splice(i, 1);
            i--;
        }
      }

      // If the radix is 10, simply return the array of characters joined and
      // cast as a number. Otherwise, use parseInt( ).
      if(nRadix == 10) {
        return Number(aCharacters.join(""));
      }
      else {
        return parseInt(aCharacters.join(""), nRadix);
      }
    }

    // This method is used to retreive grouping, decimal, and currency symbols
    // based on the locale.
    private function getSymbols(bCurrency:Boolean, lStyle:Locale):Object {
      var oSymbols:Object = new Object();
      switch(lStyle.languageVariant) {
        case "en-US":
          oSymbols.currency = "$";
          oSymbols.group = ",";
          oSymbols.decimal = ".";
          oSymbols.before = true;
          break;
        case "en-UK":
          oSymbols.currency = "\u00A3";
          oSymbols.group = ",";
          oSymbols.decimal = ".";
          oSymbols.before = true;
          break;
        case "es-MX":
          oSymbols.currency = "$";
          oSymbols.group = ",";
          oSymbols.decimal = ".";
          oSymbols.before = true;
          break;
        case "es-ES":
          oSymbols.currency = "\u20AC";
          oSymbols.group = ".";
          oSymbols.decimal = ",";
          oSymbols.before = false;
          break;
        case "fr":
          oSymbols.currency = "\u20AC";
          oSymbols.group = ".";
          oSymbols.decimal = ",";
          oSymbols.before = false;
          break;
        case "sv":
          oSymbols.currency = "kr";
          oSymbols.group = bCurrency ? "," : " ";
          oSymbols.decimal = ".";
          oSymbols.before = false;
          break;
        case "jp":
          oSymbols.currency = "\u200A5";
          oSymbols.group = ",";
          oSymbols.decimal = ".";
          oSymbols.before = true;
          break;
        case "nl":
          oSymbols.currency = "€";
          oSymbols.group = ".";
          oSymbols.decimal = ",";
          oSymbols.before = true;
          break; 
        default:
          oSymbols.currency = "\u20AC";
          oSymbols.group = ".";
          oSymbols.decimal = ",";
          oSymbols.before = true;
          break;
      }
      return oSymbols;
    }

  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合成人精品亚洲另类欧美| 亚洲一二三四在线观看| 秋霞电影一区二区| 狠狠色伊人亚洲综合成人| 日本高清成人免费播放| 久久久久久9999| 日本成人在线电影网| 色天使色偷偷av一区二区| 国产亚洲欧美色| 久久国产麻豆精品| 91精品国产综合久久久蜜臀图片| 亚洲欧洲成人av每日更新| 国产在线精品一区二区不卡了 | 亚洲精品国产无套在线观| 国产在线精品一区二区夜色 | 成人激情电影免费在线观看| 91精品黄色片免费大全| 亚洲国产精品一区二区www| 色综合久久天天综合网| 国产精品婷婷午夜在线观看| 国产成人在线网站| 久久久精品人体av艺术| 国产综合色产在线精品| 精品国产乱码久久久久久牛牛| 亚洲一区二区视频在线观看| 欧美综合一区二区| 一区二区三区在线不卡| 色呦呦一区二区三区| 国产精品―色哟哟| 成人免费视频视频在线观看免费| 国产亚洲污的网站| 不卡视频免费播放| 亚洲精品综合在线| 在线视频亚洲一区| 三级不卡在线观看| 欧美一区日韩一区| 久久99国产精品久久99| 国产三级精品三级| 99精品视频免费在线观看| 国产精品欧美一级免费| 97久久超碰国产精品| 亚洲一区视频在线观看视频| 欧美日韩三级一区| 青青草伊人久久| 精品国产91亚洲一区二区三区婷婷| 激情欧美日韩一区二区| 久久精品视频免费| 91在线云播放| 午夜视频一区二区| 久久久久久久久久久久久久久99| 成人黄色大片在线观看| 亚洲午夜久久久久| 久久综合资源网| 91视频国产观看| 久久激情五月婷婷| 国产精品成人免费精品自在线观看 | 麻豆高清免费国产一区| 亚洲欧洲99久久| 欧美午夜宅男影院| 国产伦精品一区二区三区视频青涩| 亚洲国产电影在线观看| 欧美亚洲图片小说| 激情都市一区二区| 亚洲一区二区三区爽爽爽爽爽| 欧美一级黄色录像| 91视频.com| 精品一区二区三区久久| 亚洲免费观看视频| 337p粉嫩大胆噜噜噜噜噜91av| 91在线国产福利| 久久99国内精品| 亚洲午夜成aⅴ人片| 2020国产精品自拍| 欧美日韩黄色影视| 成人av免费观看| 精品在线观看视频| 亚洲一区免费视频| 欧美国产精品劲爆| 欧美一级欧美一级在线播放| av午夜精品一区二区三区| 精品综合久久久久久8888| 有坂深雪av一区二区精品| 久久美女艺术照精彩视频福利播放| 欧美中文一区二区三区| av爱爱亚洲一区| 国产一区二区在线影院| 日韩av一级电影| 亚洲成av人片一区二区| 国产精品国产三级国产a | 成人免费一区二区三区视频| 日韩欧美国产精品| 欧美日韩一区小说| 在线精品国精品国产尤物884a| 国产东北露脸精品视频| 激情综合亚洲精品| 日本欧美在线观看| 午夜在线电影亚洲一区| 夜夜嗨av一区二区三区| 亚洲天堂2016| 国产精品久久久久久久久免费桃花 | 99久久久精品| 国产91富婆露脸刺激对白| 国产一区欧美二区| 九色|91porny| 久久精品噜噜噜成人av农村| 日韩专区中文字幕一区二区| 一区二区三区欧美| 亚洲欧美国产三级| 亚洲免费观看高清完整版在线| 中文天堂在线一区| 成人免费一区二区三区视频 | 久久国产夜色精品鲁鲁99| 日韩和欧美的一区| av在线播放成人| 97se亚洲国产综合自在线| 97超碰欧美中文字幕| 色乱码一区二区三区88| 在线视频观看一区| 欧美日韩国产首页在线观看| 9191久久久久久久久久久| 欧美一区在线视频| 久久综合给合久久狠狠狠97色69| 欧美精品一区二| 国产女同互慰高潮91漫画| 国产精品国产三级国产aⅴ入口 | 国产精品白丝在线| 亚洲欧美另类综合偷拍| 亚洲成人午夜影院| 麻豆精品在线看| 国产一区二区伦理| 不卡一区二区在线| 欧美日韩国产精品成人| 欧美福利电影网| 久久精品亚洲精品国产欧美| 亚洲视频每日更新| 丝袜亚洲精品中文字幕一区| 狠狠久久亚洲欧美| 97se亚洲国产综合自在线观| 91精品欧美福利在线观看| 久久亚洲春色中文字幕久久久| 综合久久给合久久狠狠狠97色| 一区二区三区av电影| 蜜臀久久久久久久| 成人av网在线| 51精品视频一区二区三区| 久久久久久一二三区| 一区二区三区自拍| 精品一区二区免费在线观看| 91在线精品秘密一区二区| 日韩免费高清电影| 亚洲人成影院在线观看| 乱一区二区av| 色综合久久综合网欧美综合网| 日韩视频免费观看高清完整版在线观看 | 精品成人私密视频| 亚洲精品日韩专区silk| 久久国产麻豆精品| 在线精品观看国产| 国产精品日产欧美久久久久| 日本中文字幕不卡| eeuss影院一区二区三区| 日韩一区二区三| 亚洲一区二区三区自拍| www..com久久爱| 2020国产精品| 蜜桃免费网站一区二区三区| 一本久久a久久免费精品不卡| 亚洲精品在线免费观看视频| 亚洲成人动漫一区| 色综合色狠狠天天综合色| 国产偷国产偷亚洲高清人白洁| 日韩黄色小视频| 欧美色中文字幕| 最新欧美精品一区二区三区| 国产成人av在线影院| 欧美sm极限捆绑bd| 天天影视色香欲综合网老头| 色狠狠色狠狠综合| 国产精品你懂的| 国产成人免费网站| 26uuu精品一区二区| 久久精品理论片| 日韩一区二区三| 日韩电影免费在线看| 欧美日韩国产一级二级| 午夜精品在线看| 欧美日韩一卡二卡| 亚洲激情图片小说视频| 日本高清成人免费播放| 一区二区三区欧美亚洲| 一本一道久久a久久精品 | 99这里都是精品| 欧美国产成人精品| 岛国一区二区在线观看| 亚洲国产精品v| www.欧美亚洲| 亚洲视频综合在线| 91九色最新地址| 亚洲成在人线免费| 欧美一区二区精美|