store.js 提供了一套跨浏览器的本地存储解决方案。
// 将 'marcus' 存为 'username'
store.set('username', 'marcus')
// 获取 'username'
Tested with UE 4.21 | |
1. Open your UE4 engine folder [Program files or something else you like]\Epic Games\UE_4.21\Engine\Source\Programs\UnrealBuildTool | |
2. Open file Epic Games\UE_4.21\Engine\Source\Programs\UnrealBuildTool\Platform\Windows\VCToolChain.cs | |
3. Find method void AppendCLArguments_CPP(CppCompileEnvironment CompileEnvironment, List<string> Arguments) | |
4. Add Arguments.Add("/std:c++17"); to begin of method | |
5. Open Epic Games\UE_4.21\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj in MSVS 2017 | |
6. Rebuild UnrealBuildTool | |
7. Open your project and rebuild it | |
8. Enjoy c++17 features |
/** | |
* Creates a RegExp from the given string, converting asterisks to .* expressions, | |
* and escaping all other characters. | |
*/ | |
function wildcardToRegExp (s) { | |
return new RegExp('^' + s.split(/\*+/).map(regExpEscape).join('.*') + '$'); | |
} | |
/** | |
* RegExp-escapes all characters in the given string. |
function logClass(target: any) { | |
// save a reference to the original constructor | |
var original = target; | |
// a utility function to generate instances of a class | |
function construct(constructor, args) { | |
var c : any = function () { | |
return constructor.apply(this, args); | |
} |