mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 09:35:48 +00:00
1a1a956831
Reviewed By: mhorowitz Differential Revision: D6847638 fbshipit-source-id: d9ae3d182d6f07bcac81cfd06dcc19f8139bb1e4
20 lines
387 B
C++
20 lines
387 B
C++
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#include "JSCUtils.h"
|
|
|
|
#include <folly/Conv.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
String jsStringFromBigString(JSContextRef ctx, const JSBigString& bigstr) {
|
|
if (bigstr.isAscii()) {
|
|
return String::createExpectingAscii(ctx, bigstr.c_str(), bigstr.size());
|
|
} else {
|
|
return String(ctx, bigstr.c_str());
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|