ArkScript
A small, fast, functional and scripting language for video games
Utils.hpp File Reference

Lots of utilities about string, filesystem and more. More...

#include <algorithm>
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include <Ark/Constants.hpp>
+ Include dependency graph for Utils.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Ark
 
namespace  Ark::Utils
 

Functions

std::vector< std::string > Ark::Utils::splitString (const std::string &source, char sep)
 Cut a string into pieces, given a character separator.
 
bool Ark::Utils::isDouble (const std::string &s, double *output=nullptr)
 Checks if a string is a valid double.
 
int Ark::Utils::decPlaces (double d)
 Count the number of decimals for a double.
 
int Ark::Utils::digPlaces (double d)
 Count the number of digits for a double.
 
int Ark::Utils::levenshteinDistance (const std::string &str1, const std::string &str2)
 Calculate the Levenshtein distance between two strings.
 

Detailed Description

Lots of utilities about string, filesystem and more.

Author
Alexandre Plateau (lexpl.nosp@m.t.de.nosp@m.v@gma.nosp@m.il.c.nosp@m.om)
Version
0.3
Date
2020-10-27

Definition in file Utils.hpp.