teditor  1.8.0@@fee5e94
Terminal based editor written in C++
Namespaces | Functions
utils.cpp File Reference
#include "utils.h"
#include <cstdlib>
#include <cstring>
#include "utf8.h"
#include <sstream>
#include <algorithm>
#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <fstream>
#include <iostream>
#include <cctype>
#include "file_utils.h"
#include <chrono>
#include <ctime>
#include <thread>

Namespaces

 teditor
 

Functions

std::string teditor::format (const char *fmt, va_list &vl)
 
std::string teditor::format (const char *fmt,...)
 
std::string teditor::env (const std::string &s)
 
bool teditor::startsWith (const char *s1, int len1, const char *s2)
 
Strings teditor::split (const std::string &str, char delim)
 
std::string teditor::join (const Strings &s, char delim, int start, int end)
 
std::string teditor::num2str (int num)
 
int teditor::str2num (const std::string &str)
 
float teditor::str2real (const std::string &str)
 
double teditor::str2double (const std::string &str)
 
bool teditor::isUnderGit (const std::string &dir)
 
std::string teditor::gitBranchName (const std::string &dir)
 
CmdStatus teditor::check_output (const std::string &cmd)
 
CmdStatus teditor::check_output (const std::string &cmd, const std::string &host)
 
std::string teditor::urlHexify (const std::string &url)
 Hexify the input url. More...
 
void teditor::downloadUrl (const std::string &url, const std::string &file, const std::string &dnldProg="curl", const std::string &dnldProgOpts="-s")
 Download the content of input url into the given file. More...
 
std::string teditor::downloadUrlToString (const std::string &url, const std::string &dnldProg="curl", const std::string &dnldProgOpts="-s")
 Download the content of input url into a string. More...
 
bool teditor::isOpenParen (char c)
 
bool teditor::isCloseParen (char c)
 
bool teditor::isParen (char c)
 
char teditor::getMatchingParen (char c)
 
std::string teditor::expandEnvVars (const std::string &str)
 
bool teditor::strFind (const std::string &line, const std::string &str)
 
bool teditor::iStrFind (const std::string &line, const std::string &str)
 
void teditor::dos2unix (std::string &in)
 
std::string teditor::dos2unix (const std::string &in)
 
unsigned teditor::numThreads ()