summaryrefslogtreecommitdiff
path: root/Source/Core/Common/StringUtil.cpp
AgeCommit message (Collapse)Author
2018-06-03StringUtil: Remove ValueToString(std::string)Léo Lam
Doesn't make a lot of sense to have a function that gives the string representation for a string.
2018-06-03Move Config ValueToString to StringUtilLéo Lam
An identical implementation is used by IniFile, so move those functions to StringUtil. A future commit will modify IniFile to use them.
2018-04-12Reformat all the things!spycrab
2018-03-26StringUtil: Fix possible bad freeMiikka Juomoja
2018-01-11Modified StringUtil to change UTF16ToUTF8 to use a wstring_convert and ↵34will
codecvt_utf8<wchar_t> to convert a UTF16 wstring to a UTF8 string.
2018-01-11Modified UTF16BEUTF8 to just convert the UTF-16 C-string into a ↵34will
std::u16string, and pass it into CodeToUTF8 with the 'from' parameter being "UTF-16BE", rather than manually performing the big endian to little endian encoding.
2018-01-11Modified StringUtil to use a u16string instead of a wstring in the non-win32 ↵34will
UTF16BEToUTR8 method.
2017-11-11Simplify StringUtil::UTF16ToUTF8JosJuice
2017-11-11Remove unneeded check in StringUtil::UTF16ToUTF8JosJuice
No code is relying on this unexplained null byte check, since the only code that calls UTF16ToUTF8 on non-Windows systems is UTF16BEToUTF8, which explicitly strips null bytes.
2017-11-03When NAND is damaged, show title names from save filesJosJuice
The earlier code always tried to use TitleDatabase for getting title names, but that didn't work for disc-based games, because there was no way to get the maker ID.
2017-11-03Add WiiSaveBanner classJosJuice
This class is similar to the BannerLoaderWii class that was removed in ee694e32.
2017-09-18StringUtil: support TryParse(u16*)Pierre Bourdon
2017-07-05Replace StringFromInt with std::to_stringLéo Lam
Updated version of #47. Android should support to_string now that we use a modern version of libc++ when building.
2017-06-11StringUtil: Make SplitString return by valueLéo Lam
Simpler usage.
2017-06-06StringUtil: StringPopBackIf addedSepalani
2017-05-01Convert VolumeDirectory names back to SHIFT-JIS (issue #9988)spycrab
2017-04-06StringUtil: Fix a ctype assertionSepalani
2017-03-27Initial support for Haiku.Augustin Cavalier
2017-02-25IniFile: Handle s64/u64 valuesLioncash
2017-02-04Translate Swedish in example strings to EnglishJosJuice
2016-12-18Import/Export signature files as CSVSepalani
2016-11-26IOS HLE: More robust escaping of NAND pathsJosJuice
Prevents path traversal without needing an absolute path function, and also improves accuracy (character sequences like ../ appear to have no special meaning in IOS). This removes the creation and usage of /sys/replace, because the new escapes are too complicated to all be representable in its format and because no other NAND handling software seems to use /sys/replace.
2016-07-17OpenBSD doesn't support per-thread locales.Anthony J. Bentley
2016-07-13StringUtil: Make TryParse parse floats as booleansLéo Lam
This is needed to keep compatibility with old configuration files which didn't store booleans as booleans, but as floats/doubles.
2016-06-24Further fixes to the formatting change. WX sucks.Pierre Bourdon
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-06-18StringUtil: Add a HexDump function.Pierre Bourdon
Generates a string like the following from a binary blob: 000000: 00 00 04 74 79 70 65 00 09 61 70 70 2d 73 74 61 ...type..app-sta 000010: 72 74 rt
2016-01-21Correct ampersands as wellmathieui
2016-01-21More asterisksmathieui
2016-01-21Common: asterisks go against the type namemathieui
not the variable name
2015-12-02Merge pull request #2733 from AdmiralCurtiss/string-from-floatMarkus Wick
IniFile: Fix floating point number locale issues.
2015-09-26Common: Remove other Common prefixed headers from Common.hLioncash
2015-08-04Fix some warningsTillmann Karras
reorder, sign-compare, pessimizing-move
2015-07-11StringUtil: Always use the default C locale for StringFromFormat() instead ↵Admiral H. Curtiss
of a system-specific one.
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-03-14Core: Change NULLs to nullptrs.Rohit Nirmal
2015-02-04Use the C locale for non-Windows CharArrayFromFormatV() and StringFromFormat()Gabriel Corona
The Windows implementations of CharArrayFromFormatV() and StringFromFormat() use the "C"/".1252" locale instead of the user locale (using _vsnprintf_l). On non-Windows, the user locale was used. This leads to bugs on non-Windows: the Overclock parameter was serialised with the user locale ("0,279322" in some locale) and was interpreted back as "0" (because the C locale is used for parsing the string). Make non-Windows CharArrayFromFormatV() and StringFromFormat() consistent with their Windows counterpart. The locale code is not enables for Android:: uselocale is only available since API 21 and API 21 only supports C and C.UTF-8.
2015-01-28Use printf-like format in JitRegister::RegisterGabriel Corona
The API is cleaner (no more magic default parameter) and more extensible like this.
2015-01-12Minor consistency changesStevoisiak
Mostly small changes, like capitalization and spelling
2014-12-05Common: Remove locale based functions from CommonFuncs.Lioncash
Since %f isn't used anymore in the shader generators, these can go.
2014-09-08Include CommonTypes.h instead of Common.h.Rohit Nirmal
2014-09-05Common: Fix a potential infinite loop in ReplaceAlllioncash
Prior to this change, it was possible to cause an infinite loop by making the string to be replaced and the replacing string the same thing. e.g. std::string some_str = "test"; ReplaceAll(some_str, "test", "test"); This also changes the replacing in a way that doesn't require starting from the beginning of the string on each replacement iteration.
2014-09-04DolphinWX: Simplify wiki link constructionLioncash
2014-08-12Common: Fix AsciiToHex returning true on overflow valuesLioncash
We should be checking errno against ERANGE.
2014-03-14Kill off some usages of c_str.Lioncash
Also changes some function params, but this is ok. Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-11Fixes spacing for "for", "while", "switch" and "if"Matthew Parlane
Also moved && and || to ends of lines instead of start. Fixed misc vertical alignments and some { needed newlining.
2014-03-09clang-modernize -use-nullptrTillmann Karras
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-02-22Make Common/ mostly IWYU clean (and fix errors in rest of the project ↵Pierre Bourdon
detected by this change).
2014-02-20Fix more header sorting issues in Common/ (now check-includes clean).Pierre Bourdon