Skip to content

Commit

Permalink
Небольшие исправления.
Browse files Browse the repository at this point in the history
  • Loading branch information
orefkov committed May 3, 2021
1 parent 96fe5e7 commit 949e362
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
12 changes: 12 additions & 0 deletions src/include/core_as/sstring.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,18 @@ class str_algs {
return false;
return !myLen || 0 == traits::compare(text.c_str(), _str(), myLen);
}
// Заканчивается ли строка указанной подстрокой
bool isSuffixed(SimpleStr suffix) {
return suffix.length() <= _len() && (suffix.length() == 0 || (*this)(-int(suffix.length())).isEqual(suffix));
}
// Заканчивается ли строка указанной подстрокой без учета регистра ASCII
bool isSuffixedia(SimpleStr suffix) {
return suffix.length() <= _len() && (suffix.length() == 0 || (*this)(-int(suffix.length())).isEqualia(suffix));
}
// Заканчивается ли строка указанной подстрокой без учета регистра UNICODE
bool isSuffixediu(SimpleStr suffix) {
return suffix.length() <= _len() && (suffix.length() == 0 || (*this)(-int(suffix.length())).isEqualiu(suffix));
}

bool isAscii() const noexcept {
if (_isEmpty())
Expand Down
4 changes: 2 additions & 2 deletions src/include/core_as/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define F_VERSION 1,0,0,6
#define P_VERSION "1.0.0.6"
#define F_VERSION 1,0,0,7
#define P_VERSION "1.0.0.7"
#define COPY_RIGHT "© Àëåêñàíäð Îðåôêîâ, 2021"
16 changes: 11 additions & 5 deletions src/starter/starter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,25 +238,31 @@ void processResumeInject() {
}
}

void processLoadModule(ssw msg) {
coreModule->log<LogLevel::Info>(+L"Load module "_ss & msg);
}

void processMsgFromOther(const wchar_t* msg) {
wchar_t* end;
long cmd = wcstol(msg, &end, 0);
if (*end == ' ')
++end;
SimpleStrNtW tail = e_s(end);
switch (cmd) {
case smInject:
processInject(e_s(end));
processInject(tail);
break;
case smLoadModule:
processLoadModule(tail);
break;
case smConnect:
processConnect(e_s(end));
processConnect(tail);
break;
case smDisconnect:
processDisconnect(e_s(end));
processDisconnect(tail);
break;
case smShowNotify:
processShowNotify(e_s(end));
processShowNotify(tail);
break;
case smStopInject:
processStopInject();
Expand All @@ -265,7 +271,7 @@ void processMsgFromOther(const wchar_t* msg) {
processResumeInject();
break;
case smBrodcast:
processBroadCast(e_s(end));
processBroadCast(tail);
break;
}
}
Expand Down

0 comments on commit 949e362

Please sign in to comment.