-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace more %xy in mission names (#1166)
* replace more %xx in mission names * update encoding list
- Loading branch information
Showing
7 changed files
with
287 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include "script_component.hpp" | ||
/* ---------------------------------------------------------------------------- | ||
Function: CBA_fnc_decodeURL | ||
Description: | ||
Reverse URL encoded text to readable text. | ||
Parameters: | ||
_string - URL encoded text <STRING> | ||
Returns: | ||
_return - Human readable text <STRING> | ||
Examples: | ||
(begin example) | ||
"Mission%20Name" call CBA_fnc_decodeURL; // "Mission Name" | ||
(end) | ||
Author: | ||
commy2 | ||
---------------------------------------------------------------------------- */ | ||
|
||
params [["_string", "", [""]]]; | ||
if (_string isEqualTo "") exitWith {""}; | ||
|
||
private _cache = missionNamespace getVariable [QGVAR(URLCache), objNull]; | ||
private _return = _cache getVariable _string; | ||
|
||
if (isNil "_return") then { | ||
_return = _string; | ||
|
||
{ | ||
_return = ([_return] + _x) call CBA_fnc_replace; | ||
} forEach UTF8_TABLE; | ||
|
||
if (isNull _cache) then { | ||
_cache = [] call CBA_fnc_createNamespace; | ||
missionNamespace setVariable [QGVAR(URLCache), _cache]; | ||
}; | ||
|
||
_cache setVariable [_string, _return]; | ||
}; | ||
|
||
_return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters