Skip to content
/ fstring Public
forked from bvbfan/fstring

A quick C++ formatting library

License

Notifications You must be signed in to change notification settings

biwiki/fstring

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

C++ FString

A quick C++ formatting library

I was working on a logging library, and needed some way to format strings quickly, simple and clean, so I wrote this library.

This library is not the best in general, but for my project needs it is the fastest and the best

Features

  • Easy include and just call fstring()
  • Fast Just a simple code to extract and modify the string
  • Light No lots of code, just one class with only one function to call
  • CrossPlatform It doesn't use any third party libraries, so it should work anywhere

Syntax

// parameters
fstring("{}, {}", "Hello","World"); // "Hello, World"

// padding
fstring("%5Hello%5World%5"); // "     Hello     World     "

// smart padding, divide string to sections, final padding = padding - length of section
fstring("%.10Hello.%%.10World.%"); // "Hello     World     "

// result
fstring(..).get(); // return to &string

Target

  • Providing an easy, fast and clean way to format strings

  • Providing the best performance for millions of times use

Test Info

  • OS: Ubuntu 22.04 LTS / 64-bit
  • Processor: Intel® Core™ i7-6500U CPU @ 2.50GHz × 4
  • Compiler: g++ 12
  • Flags: -O3
  • C++ Version: 23

About

A quick C++ formatting library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%