Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mayaqua/Internat.c')
-rw-r--r--src/Mayaqua/Internat.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Mayaqua/Internat.c b/src/Mayaqua/Internat.c
index 3015fce4..28f95f4b 100644
--- a/src/Mayaqua/Internat.c
+++ b/src/Mayaqua/Internat.c
@@ -1580,6 +1580,26 @@ UINT UtfToUni(wchar_t *unistr, UINT size, char *utfstr)
return UniStrLen(unistr);
}
+void UniTrimDoubleQuotation(wchar_t *str)
+{
+ if (str == NULL || UniStrLen(str) <= 2)
+ {
+ return;
+ }
+
+ if (UniStartWith(str, L"\"") && UniEndWith(str, L"\""))
+ {
+ UINT len;
+
+ UniStrCpy(str, 0, str + 1);
+ len = UniStrLen(str);
+ if (len >= 1)
+ {
+ str[len - 1] = 0;
+ }
+ }
+}
+
// Copy the UTF-8 string to a Unicode string
wchar_t *CopyUtfToUni(char *utfstr)
{