EHS/src/StrToHash.cpp

31 lines
710 B
C++

#include <ehs/EHS.h>
#include <ehs/Str.h>
#include <ehs/io/Console.h>
int main()
{
ehs::Initialize("StrToHash", "Release", {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();
ehs::Uninitialize();
return 0;
}