EHS/src/StrToHash.cpp
Karutoh bcd71cf2b5
All checks were successful
Build & Release / Windows-AMD64-Build (push) Successful in 1m8s
Build & Release / Linux-AMD64-Build (push) Successful in 1m30s
Build & Release / Linux-AARCH64-Build (push) Successful in 3m21s
Adjusted workflow.
2024-02-05 22:25:30 -08:00

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;
}