Provides a collection of useful non-ANSI string functions.
More...
|
file | vstring.c |
| Class Vstring methods.
|
|
file | vstring.h |
| Contains declarations for class Vstring.
|
|
|
char * | Vstring_wrappedtext (const char *str, int right_margin, int left_padding) |
|
VEXTERNC int | Vstring_strcasecmp (const char *s1, const char *s2) |
| Case-insensitive string comparison (BSD standard)
|
|
VEXTERNC int | Vstring_isdigit (const char *tok) |
| A modified sscanf that examines the complete string.
|
|
Provides a collection of useful non-ANSI string functions.
◆ Vstring_isdigit()
VEXTERNC int Vstring_isdigit |
( |
const char * | tok | ) |
|
A modified sscanf that examines the complete string.
- Author
- Todd Dolinsky
- Parameters
-
- Returns
- 1 if the entire string is an integer, 0 if otherwise.
Definition at line 130 of file vstring.c.
◆ Vstring_strcasecmp()
VEXTERNC int Vstring_strcasecmp |
( |
const char * | s1, |
|
|
const char * | s2 ) |
Case-insensitive string comparison (BSD standard)
- Author
- Copyright (c) 1988-1993 The Regents of the University of California. Copyright (c) 1995-1996 Sun Microsystems, Inc.
- Note
- Copyright (c) 1988-1993 The Regents of the University of California. Copyright (c) 1995-1996 Sun Microsystems, Inc.
- Parameters
-
s1 | First string for comparison |
s2 | Second string for comparison |
- Returns
- An integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2. (Source: Linux man pages)
Definition at line 66 of file vstring.c.
◆ Vstring_wrappedtext()
VEXTERNC char * Vstring_wrappedtext |
( |
const char * | str, |
|
|
int | right_margin, |
|
|
int | left_padding ) |
Creates a wrapped and indented string from an input string
- Author
- Tucker Beck
- Note
- This funciton allocates a new string, so be sure to free it!
Creates a wrapped and indented string from an input string
- Author
- Tucker Beck
- Note
- This function allocates a new string, so be sure to free it!
- Note
- : The +2 is for the newline character and the null-terminating character;
- Parameters
-
str | The input string to wrap and indent |
right_margin | The number of characters to the right margin |
left_padding | The number of characters in the left indent |
Definition at line 155 of file vstring.c.