31 lines
776 B
C++
31 lines
776 B
C++
|
#include <ehs/EHS.h>
|
||
|
#include <ehs/Str.h>
|
||
|
#include <ehs/io/Console.h>
|
||
|
|
||
|
ehs::Int_32 Main(ehs::Str_8* appName, ehs::Str_8* appVerId, ehs::Version* appVer)
|
||
|
{
|
||
|
*appName = "StrToHash";
|
||
|
*appVerId = "Release";
|
||
|
*appVer = {1, 0, 0};
|
||
|
|
||
|
ehs::Vector<ehs::Str_8> args = ehs::Console::GetArgs_8();
|
||
|
|
||
|
if (args.Size() > 1)
|
||
|
{
|
||
|
for (ehs::UInt_64 i = 1; i < args.Size(); ++i)
|
||
|
ehs::Console::Write_8("Result " + ehs::Str_8::FromNum(i) + ": " + ehs::Str_8::FromNum(args[i].Hash_64()));
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
ehs::Console::Write_8("String: ", false);
|
||
|
ehs::Str_8 in = ehs::Console::Read_8();
|
||
|
ehs::Console::Write_8("Result: " + ehs::Str_8::FromNum(in.Hash_64()));
|
||
|
|
||
|
ehs::Console::Read_8();
|
||
|
}
|
||
|
|
||
|
ehs::Console::Free();
|
||
|
|
||
|
return 0;
|
||
|
}
|