Unix/Linux Go Back    

NetBSD 6.1.5 - man page for prop_string (netbsd section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

PROP_STRING(3)			   BSD Library Functions Manual 		   PROP_STRING(3)

     prop_string, prop_string_create, prop_string_create_cstring,
     prop_string_create_cstring_nocopy, prop_string_copy, prop_string_copy_mutable,
     prop_string_size, prop_string_mutable, prop_string_cstring, prop_string_cstring_nocopy,
     prop_string_append, prop_string_append_cstring, prop_string_equals,
     prop_string_equals_cstring -- string value property object

     library ``libprop''

     #include <prop/proplib.h>


     prop_string_create_cstring(const char *cstring);

     prop_string_create_cstring_nocopy(const char *cstring);

     prop_string_copy(prop_string_t string);

     prop_string_copy_mutable(prop_string_t string);

     prop_string_size(prop_string_t string);

     prop_string_mutable(prop_string_t string);

     char *
     prop_string_cstring(prop_string_t string);

     const char *
     prop_string_cstring_nocopy(prop_string_t string);

     prop_string_append(prop_string_t str1, prop_string_t str2);

     prop_string_append_cstring(prop_string_t string, const char *cstring);

     prop_string_equals(prop_string_t str1, prop_string_t str2);

     prop_string_equals_cstring(prop_string_t string, const char *cstring);

     The prop_string family of functions operate on a string value property object type.

	    Create an empty mutable string.  Returns NULL on failure.

     prop_string_create_cstring(const char *cstring)
	    Create a mutable string that contains a copy of cstring.  Returns NULL on failure.

     prop_string_create_cstring_nocopy(const char *cstring)
	    Create an immutable string that contains a reference to cstring.  Returns NULL on

     prop_string_copy(prop_string_t string)
	    Copy a string.  If the string being copied is an immutable external C string refer-
	    ence, then the copy is also immutable and references the same external C string.
	    Returns NULL on failure.

     prop_string_copy_mutable(prop_string_t string)
	    Copy a string, always creating a mutable copy.  Returns NULL on failure.

     prop_string_size(prop_string_t string)
	    Returns the size of the string, not including the terminating NUL.	If the supplied
	    object isn't a string, zero is returned.

     prop_string_mutable(prop_string_t string)
	    Returns true if the string is mutable.  If the supplied object isn't a string, false
	    is returned.

     prop_string_cstring(prop_string_t string)
	    Returns a copy of the string's contents as a C string.  The caller is responsible for
	    freeing the returned buffer.

	    In user space, the buffer is allocated using malloc(3).  In the kernel, the buffer is
	    allocated using malloc(9) using the malloc type M_TEMP.

	    Returns NULL on failure.

     prop_string_cstring_nocopy(prop_string_t string)
	    Returns an immutable reference to the contents of the string as a C string.  If the
	    supplied object isn't a string, NULL is returned.

     prop_string_append(prop_string_t str1, prop_string_t str2)
	    Append the contents of str2 to str1, which must be mutable.  Returns true upon suc-
	    cess and false otherwise.

     prop_string_append_cstring(prop_string_t string, const char *cstring)
	    Append the C string cstring to string, which must be mutable.  Returns true upon suc-
	    cess and false otherwise.

     prop_string_equals(prop_string_t str1, prop_string_t str2)
	    Returns true if the two string objects are equivalent.

     prop_string_equals_cstring(prop_string_t string, const char *cstring)
	    Returns true if the string's value is equivalent to cstring.

     prop_array(3), prop_bool(3), prop_data(3), prop_dictionary(3), prop_number(3),
     prop_object(3), proplib(3)

     The proplib property container object library first appeared in NetBSD 4.0.

BSD					 January 21, 2008				      BSD
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 01:13 AM.