{infiniteZest}
// Articles. Tutorials. Utilities.
Home  |   Search  |   Login  
Categories Skip Navigation Links
New / All
AJAX
Apple
ASP.NET
.NET
Git
Google / Android
Python / IronPython
Miscellaneous
SQL Server
AJAX Source Viewer
View the source code of a Method from ASP.NET AJAX Library. Choose a method from the menu items above (Namespaces, Classes, or Methods).
Method '_parseNumberNegativePattern(value, numFormat, numberNegativePattern)'
Method: _parseNumberNegativePattern(value, numFormat, numberNegativePattern)
Method Full Name:     Number$_parseNumberNegativePattern(value, numFormat, numberNegativePattern)
Class: Number
Namespace: Global (MicrosoftAjax.debug.js)
Source File: MicrosoftAjax.debug.js
1   Number._parseNumberNegativePattern = function Number$_parseNumberNegativePattern(value, numFormat, numberNegativePattern) {
2     var neg = numFormat.NegativeSign;
3     var pos = numFormat.PositiveSign;
4     switch (numberNegativePattern) {
5       case 4:
6         neg = ' ' + neg;
7         pos = ' ' + pos;
8       case 3:
9         if (value.endsWith(neg)) {
10          return ['-', value.substr(0, value.length - neg.length)];
11        }
12        else if (value.endsWith(pos)) {
13          return ['+', value.substr(0, value.length - pos.length)];
14        }
15        break;
16      case 2:
17        neg += ' ';
18        pos += ' ';
19      case 1:
20        if (value.startsWith(neg)) {
21          return ['-', value.substr(neg.length)];
22        }
23        else if (value.startsWith(pos)) {
24          return ['+', value.substr(pos.length)];
25        }
26        break;
27      case 0:
28        if (value.startsWith('(') && value.endsWith(')')) {
29          return ['-', value.substr(1, value.length - 2)];
30        }
31        break;
32      }
33      return ['', value];
34    }
This is the JavaScript source for method _parseNumberNegativePattern(value, numFormat, numberNegativePattern) from ASP.NET AJAX Library. Full name for this method is Number$_parseNumberNegativePattern(value, numFormat, numberNegativePattern). It belongs to the class Number, which is in Global (MicrosoftAjax.debug.js) namespace. This source is in MicrosoftAjax.debug.js file.
Bookmark and Share This
About  Contact  Privacy Policy  Site Map