mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 09:35:48 +00:00
20514e3482
Reviewed By: bnham Differential Revision: D4197300 fbshipit-source-id: 306ffc85e3ced24047b68499f7cdf5e2d31fc052
18 lines
362 B
C++
18 lines
362 B
C++
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#include "JSCUtils.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());
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|