diff options
author | Piotr Fusik <piotr@fusion-lang.org> | 2024-02-22 17:41:21 +0100 |
---|---|---|
committer | Piotr Fusik <piotr@fusion-lang.org> | 2024-02-22 17:41:21 +0100 |
commit | ff3fd0f04e92cbde843f6f8b8bc202fb37e561ea (patch) | |
tree | d14b4beb13cea5faaca7d1cd2b919a5a46845a91 | |
parent | 9646487c12c1c15a6b653883e6332186b3efa7a6 (diff) |
[cpp] Fix string.ToLower/ToUpper broken with ICU.
#147
-rw-r--r-- | GenCpp.fu | 4 | ||||
-rw-r--r-- | libfut.cpp | 4 | ||||
-rw-r--r-- | libfut.cs | 4 | ||||
-rw-r--r-- | libfut.js | 4 |
4 files changed, 8 insertions, 8 deletions
@@ -2035,7 +2035,7 @@ public class GenCpp : GenCCpp WriteLine("#include <unicode/unistr.h>"); if (this.StringToLower) { WriteNewLine(); - WriteLine("static std::string FuString_ToLower(std::string_view str)"); + WriteLine("static std::string FuString_ToLower(std::string_view s)"); OpenBlock(); WriteLine("std::string result;"); WriteLine("return icu::UnicodeString::fromUTF8(s).toLower().toUTF8String(result);"); @@ -2043,7 +2043,7 @@ public class GenCpp : GenCCpp } if (this.StringToUpper) { WriteNewLine(); - WriteLine("static std::string FuString_ToUpper(std::string_view str)"); + WriteLine("static std::string FuString_ToUpper(std::string_view s)"); OpenBlock(); WriteLine("std::string result;"); WriteLine("return icu::UnicodeString::fromUTF8(s).toUpper().toUTF8String(result);"); @@ -14986,7 +14986,7 @@ void GenCpp::writeProgram(const FuProgram * program) writeLine("#include <unicode/unistr.h>"); if (this->stringToLower) { writeNewLine(); - writeLine("static std::string FuString_ToLower(std::string_view str)"); + writeLine("static std::string FuString_ToLower(std::string_view s)"); openBlock(); writeLine("std::string result;"); writeLine("return icu::UnicodeString::fromUTF8(s).toLower().toUTF8String(result);"); @@ -14994,7 +14994,7 @@ void GenCpp::writeProgram(const FuProgram * program) } if (this->stringToUpper) { writeNewLine(); - writeLine("static std::string FuString_ToUpper(std::string_view str)"); + writeLine("static std::string FuString_ToUpper(std::string_view s)"); openBlock(); writeLine("std::string result;"); writeLine("return icu::UnicodeString::fromUTF8(s).toUpper().toUTF8String(result);"); @@ -15340,7 +15340,7 @@ namespace Fusion WriteLine("#include <unicode/unistr.h>"); if (this.StringToLower) { WriteNewLine(); - WriteLine("static std::string FuString_ToLower(std::string_view str)"); + WriteLine("static std::string FuString_ToLower(std::string_view s)"); OpenBlock(); WriteLine("std::string result;"); WriteLine("return icu::UnicodeString::fromUTF8(s).toLower().toUTF8String(result);"); @@ -15348,7 +15348,7 @@ namespace Fusion } if (this.StringToUpper) { WriteNewLine(); - WriteLine("static std::string FuString_ToUpper(std::string_view str)"); + WriteLine("static std::string FuString_ToUpper(std::string_view s)"); OpenBlock(); WriteLine("std::string result;"); WriteLine("return icu::UnicodeString::fromUTF8(s).toUpper().toUTF8String(result);"); @@ -15785,7 +15785,7 @@ export class GenCpp extends GenCCpp this.writeLine("#include <unicode/unistr.h>"); if (this.#stringToLower) { this.writeNewLine(); - this.writeLine("static std::string FuString_ToLower(std::string_view str)"); + this.writeLine("static std::string FuString_ToLower(std::string_view s)"); this.openBlock(); this.writeLine("std::string result;"); this.writeLine("return icu::UnicodeString::fromUTF8(s).toLower().toUTF8String(result);"); @@ -15793,7 +15793,7 @@ export class GenCpp extends GenCCpp } if (this.#stringToUpper) { this.writeNewLine(); - this.writeLine("static std::string FuString_ToUpper(std::string_view str)"); + this.writeLine("static std::string FuString_ToUpper(std::string_view s)"); this.openBlock(); this.writeLine("std::string result;"); this.writeLine("return icu::UnicodeString::fromUTF8(s).toUpper().toUTF8String(result);"); |