lullaby/modules/javascript/engine.cc
// The print function made available to scripts.
The print function made available to scripts.
The print function made available to scripts .
std::string Print(const v8::FunctionCallbackInfo<v8::Value> &args) {
  std::stringstream stream;
  for (int i = 0; i < args.Length(); i++) {
    v8::String::Utf8Value arg(args.GetIsolate(), args[i]);
    const char *s = *arg;
    if (i > 0) {
      stream << " " << s;
    } else {
      stream << s;
    }
  }
  return stream.str();
}
std :: string Print ( const v8 :: FunctionCallbackInfo < v8 :: Value > & args ) { std :: stringstream stream ; for ( int i = 0 ; i < args . Length ( ) ; i ++ ) { v8 :: String :: Utf8Value arg ( args . GetIsolate ( ) , args [ i ] ) ; const char * s = * arg ; if ( i > 0 ) { stream << " " << s ; } else { stream << s ; } } return stream . str ( ) ; }
The print function made available to scripts.
The print function made available to scripts .