私はこれがあります。比較V8文字列(Node.jsのアドオン)
if (!args[2]->IsString() || (*args[2]->ToString() != "true" && *args[2]->ToString() != "false")) {
Nan::ThrowTypeError("Third argument to 'replace-line' must be a string representing whether to find or replace.");
return;
}
を私はコンパイルエラーのandwarningsを取得:
../hello.cpp:49:58: error: comparison between distinct pointer types ‘v8::String*’ and ‘const char*’ lacks a cast [-fpermissive]
../hello.cpp:49:92: warning: comparison with string literal results in unspecified behaviour [-Waddress]
if (!args[2]->IsString() || (*args[2]->ToString() != "true" && *args[2]->ToString() != "false")) {
は、どのように私は適切に通常のC文字列とV8の文字列を比較することができますか?