2014-09-30 14:56:33 -04:00
|
|
|
library angular.core.facade.lang;
|
2014-09-19 16:38:37 -07:00
|
|
|
|
2014-09-30 14:56:33 -04:00
|
|
|
export 'dart:core' show Type;
|
2014-09-28 13:55:01 -07:00
|
|
|
|
|
|
|
class FIELD {
|
2014-10-02 12:27:01 -07:00
|
|
|
final String definition;
|
|
|
|
const FIELD(this.definition);
|
2014-09-28 13:55:01 -07:00
|
|
|
}
|
|
|
|
|
2014-10-02 12:27:01 -07:00
|
|
|
class CONST {
|
|
|
|
const CONST();
|
|
|
|
}
|
|
|
|
class ABSTRACT {
|
|
|
|
const ABSTRACT();
|
|
|
|
}
|
|
|
|
class IMPLEMENTS {
|
|
|
|
final interfaceClass;
|
|
|
|
const IMPLEMENTS(this.interfaceClass);
|
|
|
|
}
|
2014-09-26 13:52:12 -07:00
|
|
|
|
2014-09-30 14:56:33 -04:00
|
|
|
bool isPresent(obj) => obj != null;
|
|
|
|
bool isBlank(obj) => obj == null;
|
|
|
|
|
2014-10-03 16:29:59 -04:00
|
|
|
String stringify(obj) => obj.toString();
|
2014-09-26 13:52:12 -07:00
|
|
|
|
|
|
|
class StringWrapper {
|
|
|
|
static String fromCharCode(int code) {
|
|
|
|
return new String.fromCharCode(code);
|
|
|
|
}
|
|
|
|
|
|
|
|
static charCodeAt(String s, int index) {
|
|
|
|
return s.codeUnitAt(index);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class StringJoiner {
|
|
|
|
List<String> _parts = <String>[];
|
|
|
|
|
|
|
|
void add(String part) {
|
|
|
|
_parts.add(part);
|
|
|
|
}
|
|
|
|
|
|
|
|
String toString() => _parts.join("");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class NumberWrapper {
|
|
|
|
static int parseIntAutoRadix(String text) {
|
|
|
|
return int.parse(text);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int parseInt(String text, int radix) {
|
|
|
|
return int.parse(text, radix: radix);
|
|
|
|
}
|
|
|
|
|
|
|
|
static double parseFloat(String text) {
|
|
|
|
return double.parse(text);
|
|
|
|
}
|
|
|
|
}
|