Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

rphii/rlso

Repository files navigation

🧡 So - String Object

Dynamically Allocatable String in C.

πŸ› οΈ Installation

git clone https://github.com/rphii/so && cd so
setup build && meson install -C build

Installation features:

  • librlso.so the So library
  • man pages (WIP)

πŸ“Š Tests & Coverage

There are various tests.

Recommended dependencies

  • lcov (coverage)
  • gcovr (coverage)
  • valgrind (recommended)

Gentoo

emerge -a gcovr lcov valgrind

Arch

pacman -S gcovr lcov valgrind

Run

See the provided run-tests.sh script.

Results

See output of where the last command put the .html file.

✨ Features

  • Strings are not 0-terminated. Appropriate functions/macros for printing and other opterations shall be provided
  • Automatically converts any (sub-) string into a dynamic one, if manipulated (e.g. grown)

πŸ”Œ API - NEEDS REVISITING

Things that are not linked are planned but not yet implemented.

part description .h .c
so-core.md core string so.h so.c
so-cmp.md comparison so-cmp.h so-cmp.c
so-find.md find within so-find.h so-find.c
so-count.md count things so-count.h so-count.c
so-split.md split into parts so-split.h so-split.c
so-splice.md splice repeatedly so-splice.h so-splice.c
so-as.md string to type conversions so-as.h so-as.c
so-uc.md utf8 + unicode conversions so-uc.h so-uc.c
so-fx.md formatting (bold, it, ul, rgb)
so-file.md read + write files so-file.h so-file.c
so-env.md environment variables so-env.h so-env.c
so-trim.md trimming so-trim.h so-trim.c
so-path.md handling as path so-path.h so-path.c
so-print.md printing so-print.h so-print.c
so-input.md user input so-input.h so-input.c

todo so I don't forget

  • rename arguments, e.g. out -> out_ext if things only get extended/appended, to distinguish things that really clear the string!
  • e.g. out -> out_clr!

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /