mirror of
https://github.com/msojocs/wx-compiler.git
synced 2025-07-19 00:00:04 +08:00
feat: RemoveQuote
This commit is contained in:
parent
349ff43767
commit
8b3abd9b86
@ -3,9 +3,25 @@
|
||||
namespace WXSS
|
||||
{
|
||||
|
||||
std::string RemoveQuote(std::string const&)
|
||||
std::string RemoveQuote(std::string const& a2)
|
||||
{
|
||||
throw "not implement";
|
||||
std::string a1;
|
||||
if (a2.length() <= 2)
|
||||
{
|
||||
a1 = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (a2[0] == '\'' || a2[0] == '"')
|
||||
{
|
||||
a1 = a2.substr(1, a2.length() - 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
a1 = a2;
|
||||
}
|
||||
}
|
||||
return a1;
|
||||
}
|
||||
int LintAndParseCSSList(std::map<std::string,std::string> const&, std::string&, std::string&, std::string&, int, bool, bool, bool, std::string const&)
|
||||
{
|
||||
|
@ -7662,7 +7662,7 @@ char *__cdecl WXSS::RemoveQuote(char *a1, char **a2)
|
||||
else
|
||||
{
|
||||
v3 = **a2;
|
||||
if ( v3 == 39 || v3 == 34 )
|
||||
if ( v3 == '\''/*39*/ || v3 == '"'/*34*/ )
|
||||
std::string::substr(a1, a2, 1u, (unsigned int)(v2 - 2));
|
||||
else
|
||||
std::string::basic_string(a1, (int)a2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user