[Include] "stringh.inc": Implementing useful functions from C's "string.h"
#1

About "stringh.inc":

Hey... guess this is my first release here. Anyway, some of you (depending where you've come from) might know me as "Lunghi".

This include is released under the Mozilla Public License v2.0 (MPL v2.0) and is a collection of macros seeking to build upon SA:MP's solid foundations in terms of support for string manipulation and add functionality for slightly more obscure functions, taken from the C standard. The aim from the start was to emulate the most useful, and at the time missing functions from "string.h".

Functions included (click hyperlinks for function documentation):
  1. strcpy
  2. strncpy
  3. strncat
  4. strcmp
  5. strncmp
  6. strcasecmp
  7. strncasecmp
Some of the definitions might seem useless, but the idea behind those particular definitions is to give PAWN a more C-like experience, for those who feel more comfortable with it, without mandating said preference for everybody else.

In the source code, it is explained how to use each of these functions, with additional information about them alongside.

I am not sure how often any of these will be useful, but hopefully they make life easier for someone either coming over from C or C++, or someone who needs to use one of the more advanced features not available yet in PAWN.

I will be updating and maintining this as I see fit and on that note (18/MAY/2013 - when the project was first uploaded), as I did this so late at night, there may be mistakes. If anyone notices any (there probably aren't any though), then just leave a message behind and I'll fix it ASAP.

Documentation may come later (if necessary), as with an extended post and a better explanation in the body of this post about the functions.

Download (and source): http://pastebin.com/LjQGUsQN (Version: v0.5)
Credits: None (removed previous credited function(s) from the include)
Licence: Mozilla Public License v2.0 (MPL v2.0)
Reply


Messages In This Thread
"stringh.inc": Implementing useful functions from C's "string.h" - by Aeonosphere - 18.05.2013, 01:22
Re: "stringh.inc": Implementing useful functions from C's "string.h" - by RajatPawar - 18.05.2013, 04:37
Re: "stringh.inc": Implementing useful functions from C's "string.h" - by Niko_boy - 18.05.2013, 06:53
Re: "stringh.inc": Implementing useful functions from C's "string.h" - by Aeonosphere - 18.05.2013, 07:55
AW: "stringh.inc": Implementing useful functions from C's "string.h" - by BigETI - 18.05.2013, 08:01
Re: "stringh.inc": Implementing useful functions from C's "string.h" - by Emmet_ - 18.05.2013, 08:02
AW: Re: "stringh.inc": Implementing useful functions from C's "string.h" - by BigETI - 18.05.2013, 08:12
Re: AW: Re: "stringh.inc": Implementing useful functions from C's "string.h" - by Aeonosphere - 18.05.2013, 08:15
Re: AW: Re: "stringh.inc": Implementing useful functions from C's "string.h" - by Emmet_ - 18.05.2013, 08:17
Re: AW: Re: "stringh.inc": Implementing useful functions from C's "string.h" - by Aeonosphere - 18.05.2013, 08:23
Re: AW: Re: "stringh.inc": Implementing useful functions from C's "string.h" - by Emmet_ - 18.05.2013, 08:31
Re: "stringh.inc": Implementing useful functions from C's "string.h" - by Aeonosphere - 18.05.2013, 08:46
AW: "stringh.inc": Implementing useful functions from C's "string.h" - by BigETI - 18.05.2013, 10:04
Re: AW: "stringh.inc": Implementing useful functions from C's "string.h" - by Aeonosphere - 18.05.2013, 11:10
AW: "stringh.inc": Implementing useful functions from C's "string.h" - by BigETI - 18.05.2013, 14:50
AW: Re: "stringh.inc": Implementing useful functions from C's "string.h" - by BigETI - 18.05.2013, 20:06
AW: "stringh.inc": Implementing useful functions from C's "string.h" - by BigETI - 18.05.2013, 20:23
AW: "stringh.inc": Implementing useful functions from C's "string.h" - by BigETI - 18.05.2013, 20:43
AW: "stringh.inc": Implementing useful functions from C's "string.h" - by BigETI - 18.05.2013, 21:55
AW: "stringh.inc": Implementing useful functions from C's "string.h" - by BigETI - 18.05.2013, 22:35

Forum Jump:


Users browsing this thread: 1 Guest(s)