Coder Social home page Coder Social logo

string.h's Introduction

Summary of string+ Project

In the string.h project, the aim was to create a custom implementation of the string.h library in the C programming language, enriching it with additional features.

Installation:

git clone https://github.com/0xmisha/string.h.git
cd string.h/src
make

Requirements:

  • Gcc
  • Make
  • check.h (for tests)

Key Deliverables:

  1. Standard string.h Functions: The core part of the project was to replicate the functionality found in the standard string.h library. Functions such as memchr, memcpy, strncpy, and strtok are a few to mention.

  2. sprintf and sscanf Functions: The standard sprintf and sscanf functions, which deal with formatted input and output to and from strings, were also to be implemented.

  3. Special String Processing Functions: Inspired by the String class in C#, the project also required the addition of some advanced string manipulations. These functions, like to_upper, to_lower, insert, and trim, augment the traditional string processing capabilities.

  4. Quality Assurance Measures:

    • Adherence to the Google coding style was mandated.
    • The entire codebase, encompassing headers, the library, and even the Makefile, was to reside in the src folder on the develop branch.
    • The project had a strong emphasis on structured programming, mandating minimal code repetition.
    • Unit-testing, with at least 80% coverage per function, was enforced, using the Check library.
    • A gcov report in the form of an HTML page was to be generated to validate the coverage.
  5. Compliance and Restrictions:

    • The C11 standard was to be followed throughout, utilizing the gcc compiler.
    • Direct copying from the standard string.h or other string processing libraries was strictly prohibited, barring unit tests.
    • Functions were supposed to work specifically with single-byte ASCII characters.
  6. Bonus Tasks: For additional credit, participants could implement advanced format modifiers for sprintf and sscanf, and further special string processing functions from the C# String class.

In essence, the s21_string+ project is a comprehensive endeavor to understand, reimplement, and expand upon the classic string.h library. The meticulous requirements ensure not just functional accuracy, but also coding best practices and rigorous testing.

string.h's People

Contributors

0xmisha avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.