Creates a Const object from a compile-time constant string.
It is illegal to invoke this function on an expression whose
compile-time-constant value cannot be determined by the Closure compiler.
Correct invocations include,
var s = goog.string.Const.from('hello');
var t = goog.string.Const.from('hello' + 'world');
In contrast, the following are illegal:
var s = goog.string.Const.from(getHello());
var t = goog.string.Const.from('hello' + world);
Parameters | s | string | | A constant string from which to create a Const.
|
|
---|
Returns | |
---|