.to_gc_num()
Takes a GC string and turns it into a number.
Syntax
#fs.scripts.lib().to_gc_num(gc_string);
Parameters
gc_string
The formatted GC string to be turned into a number.
Return
Returns a number.
For invalid gc_string
values, the following object is returned:
{
ok: false,
msg: "GC string \"" + gc_string + "\" is not in correct format. Example GC strings: \"1M234K567GC\", \"1B5KGC\", \"2MGC\", \"9GC\"."
}
Example
function(context, args) {
const l = #fs.scripts.lib();
const my_gc_string = "100M200K300GC";
return l.to_gc_num(my_gc_string);
}