Skip to content

Troxsoft/Elip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A c++ 20 utils headers

Class

  • Elip::String
  • Elip::Vector
  • Elip::Map
  • Elip::File

Functions

Strings

  • Str
  • Split
  • And more

Format and Print

  • Format -> wiht Color(Windows,Linux,MacOS)
  • Printf ->with Format
  • PrinfWithoutColor ->Prinf without color
  • FormatfWithoutColor -> Format without color
  • And more

Terminal utils

  • ChangeTerminalTitle -> (Windows,Linux,MacOS)
  • ChangeTerminalCursorPosition -> (Windows,Linux,MacOS)
  • ActivateTerminal
  • And more

Filesystem

  • ExistsFS
  • IsFileFS
  • IsDirectoryFS
  • IsSymLinkFS
  • DeleteFS
  • CreateDirectoryFS
  • CreateSymLinkFS
  • CreateFileFS
  • And more

Vector

  • Join
  • PrintVector
  • ToVect
  • ToVectStr
  • And more

How to include ?

#include "Elip.hpp"

Examples:

  • Filesystem:
#include "Elip.hpp"
int main()
{
    if (!Elip::ExistsFS("test.txt"))
    {
        Elip::Printf("{}\n", "No existe el archivo text.txt,creando el archivo");
        Elip::CreateFileFS("test.txt");
    }
    Elip::File data("test.txt");
    data.Write("Hola mundo en c++");
    Elip::Printf("Datos del archivo: {}\n", data.ReadAsString());
}
  • Format and Printf:
#include "Elip.hpp"
using namespace Elip;
int main()
{
    //  RED    RED   GREEN
    // hello Joaquin!!!
    ActivateTerminal();
    Printf("{FG_RED}hello {}{FG_GREEN}!!!{FG_RESET}\n", "Joaquin");
    auto result = Format("hellooooo {} {}", "C++", 17);
    Printf("{}", result);
}
  • Strings:
Elip::String myString("hello python hello");
myString.Replace("python", "amo");
myString.TrimLeft("hello");
Elip::Printf("{}\n",myString);
  • More examples in examples folder License: MIT