Skip to content
Pablo R. edited this page Sep 29, 2025 · 2 revisions

STRAP — STRAP Trims, Rejoins And Parses

CI License C

A small, efficient C library providing missing utilities for safe and comfortable string manipulation and time helpers. Designed to be lightweight, portable, and easy to integrate into C projects.

🚀 Quick Start

# Clone and build
git clone https://github.com/murapadev/strap.git
cd strap
make

# Install (optional)
sudo make install

Basic Usage

#include <stdio.h>
#include "strap.h"

int main(void) {
    // Safe line reading
    char *line = afgets(stdin);
    if (line) {
        char *trimmed = strtrim(line);
        printf("Trimmed: '%s'\n", trimmed);
        free(line);
        free(trimmed);
    }

    // String joining
    const char *parts[] = {"Hello", "world", "from", "STRAP"};
    char *joined = strjoin(parts, 4, " ");
    printf("%s\n", joined);
    free(joined);

    return 0;
}

📚 Documentation

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

🗺️ Roadmap

v0.3 (Current) ✅

  • Extended locale-aware string helpers
  • Optional arena allocator for transient strings
  • Timezone-aware time utilities
  • Unified error reporting system

v0.4 (Upcoming)

  • Additional performance optimizations
  • Extended string manipulation utilities
  • Cross-platform improvements
  • Enhanced documentation

📄 License

MIT Licensed - see LICENSE for details.


STRAP - Making C string and time operations safer and more convenient.