typedef unsigned char DL_UINT8;
--
if (info[0]->IsArray()) {
v8::Handle<v8::Array> messageFields = v8::Handle<v8::Array>::Cast(info[0]);
for (unsigned int i = 0; i < messageFields->Length(); i++) {
v8::Handle<v8::Array> messageField = v8::Handle<v8::Array>::Cast(messageFields->Get(i));
DL_UINT16 messageFieldPosition = (DL_UINT16)messageField->Get(0)->Uint32Value();
const v8::String::Utf8Value _messageFieldValue(messageField->Get(1)->ToString());
// how to convert?
const DL_UINT8 messageFieldValue = (DL_UINT8)(_messageFieldValue);
//(DL_UINT16 iField, const DL_UINT8 *iDataStr)
(void)DL_ISO8583_MSG_SetField_Str( messageFieldPosition, messageFieldValue, &isoMsg);
}
}
我需要帮助转换String
此行中的值
const DL_UINT8 messageFieldValue = (DL_UINT8)(_messageFieldValue);