cudd
3.0.0
The University of Colorado Decision Diagram Package
|
Package for simple stringstreams in C. More...
Go to the source code of this file.
Typedefs | |
typedef struct _cstringstream * | cstringstream |
Type of a string stream. | |
typedef struct _cstringstream const * | const_cstringstream |
Const-qualified version of cstringstream. | |
Functions | |
cstringstream | newStringStream (void) |
Returns a new cstringstream with an empty string. More... | |
void | deleteStringStream (cstringstream ss) |
Frees cstringstream ss. | |
int | clearStringStream (cstringstream ss) |
Clears the contents of cstringstream ss. More... | |
cstringstream | copyStringStream (const_cstringstream src) |
Copies cstringstream src to a new cstringstream. More... | |
int | resizeStringStream (cstringstream ss, size_t newSize) |
Changes the size of cstringstream ss. More... | |
int | sizeStringStream (const_cstringstream ss, size_t *num) |
Writes the size of cstringstream ss to the location pointed by num. More... | |
int | getStringStream (const_cstringstream ss, size_t i, char *c) |
Writes the i-th element of cstringstream ss to the location pointed by c. More... | |
int | appendCharStringStream (cstringstream ss, char c) |
Adds char c at the end of cstringstream ss. More... | |
int | appendStringStringStream (cstringstream ss, char const *s) |
Adds string s at the end of cstringstream ss. More... | |
int | appendIntStringStream (cstringstream ss, int d) |
Adds int d at the end of cstringstream ss. More... | |
int | appendUnsignedStringStream (cstringstream ss, unsigned u) |
Adds unsigned u at the end of cstringstream ss. More... | |
int | appendLongStringStream (cstringstream ss, long ld) |
Adds long ld at the end of cstringstream ss. More... | |
int | appendUnsignedLongStringStream (cstringstream ss, unsigned long lu) |
Adds unsigned long lu at the end of cstringstream ss. More... | |
int | appendDoubleStringStream (cstringstream ss, double g) |
Adds double g at the end of cstringstream ss. More... | |
int | putStringStream (cstringstream ss, size_t index, char c) |
Sets the i-th element of cstringstream ss to c. More... | |
char * | stringFromStringStream (const_cstringstream ss) |
Returns a NULL-terminated string from the contents of cstringstream ss. More... | |
Package for simple stringstreams in C.
Copyright (c) 2014-2015, Regents of the University of Colorado
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the University of Colorado nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
int appendCharStringStream | ( | cstringstream | ss, |
char | c | ||
) |
Adds char c at the end of cstringstream ss.
int appendDoubleStringStream | ( | cstringstream | ss, |
double | g | ||
) |
Adds double g at the end of cstringstream ss.
int appendIntStringStream | ( | cstringstream | ss, |
int | d | ||
) |
Adds int d at the end of cstringstream ss.
int appendLongStringStream | ( | cstringstream | ss, |
long | ld | ||
) |
Adds long ld at the end of cstringstream ss.
int appendStringStringStream | ( | cstringstream | ss, |
char const * | s | ||
) |
Adds string s at the end of cstringstream ss.
int appendUnsignedLongStringStream | ( | cstringstream | ss, |
unsigned long | lu | ||
) |
Adds unsigned long lu at the end of cstringstream ss.
int appendUnsignedStringStream | ( | cstringstream | ss, |
unsigned | u | ||
) |
Adds unsigned u at the end of cstringstream ss.
int clearStringStream | ( | cstringstream | ss | ) |
Clears the contents of cstringstream ss.
cstringstream copyStringStream | ( | const_cstringstream | src | ) |
Copies cstringstream src to a new cstringstream.
int getStringStream | ( | const_cstringstream | ss, |
size_t | i, | ||
char * | c | ||
) |
Writes the i-th element of cstringstream ss to the location pointed by c.
cstringstream newStringStream | ( | void | ) |
Returns a new cstringstream with an empty string.
int putStringStream | ( | cstringstream | ss, |
size_t | index, | ||
char | c | ||
) |
Sets the i-th element of cstringstream ss to c.
The i-th element of ss must already exist.
int resizeStringStream | ( | cstringstream | ss, |
size_t | newSize | ||
) |
Changes the size of cstringstream ss.
int sizeStringStream | ( | const_cstringstream | ss, |
size_t * | num | ||
) |
Writes the size of cstringstream ss to the location pointed by num.
char* stringFromStringStream | ( | const_cstringstream | ss | ) |
Returns a NULL-terminated string from the contents of cstringstream ss.
In case of failure, it returns NULL. The returned string must be freed by the caller.