mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
Move JSCHelpers.h and Value.h into separate package
Reviewed By: javache Differential Revision: D3950748 fbshipit-source-id: 6315ea07f3217b485aeb4374b5f6e36333957848
This commit is contained in:
committed by
Facebook Github Bot
parent
95cb4ea752
commit
ddb8cb7cf0
17
ReactCommon/cxxreact/JSCUtils.cpp
Normal file
17
ReactCommon/cxxreact/JSCUtils.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
|
||||
#include "JSCUtils.h"
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
String jsStringFromBigString(const JSBigString& bigstr) {
|
||||
if (bigstr.isAscii()) {
|
||||
return String::createExpectingAscii(bigstr.c_str(), bigstr.size());
|
||||
} else {
|
||||
return String(bigstr.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user