Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

shwild_slice_t Struct Reference
[C API]

#include <shwild.h>

List of all members.


Detailed Description

Length-aware C-style string.

This structure is used within the library to provide higher efficiency. In order to maximise efficiency, there are equivalent versions of all API functions that allow application code to specify string arguments as string slices, including shwild_match_s(), shwild_compile_pattern_s() and shwild_match_pattern_s().


Public Member Functions

 shwild_slice_t ()
 Initialises members to default value.
 shwild_slice_t (shwild_slice_t const &rhs)
 Copies members from another slice instance.
 shwild_slice_t (size_t n, char const *s)
 Initialises members from the given parameters.

Public Attributes

size_t len
 Number of characters in the slice.
char const * ptr
 Pointer to the first character in the slice. May be NULL if len == 0.


Constructor & Destructor Documentation

shwild_slice_t  ) 
 

Initialises members to default value.

shwild_slice_t shwild_slice_t const &  rhs  ) 
 

Copies members from another slice instance.

shwild_slice_t size_t  n,
char const *  s
 

Initialises members from the given parameters.

Parameters:
n The number of characters in the string to be sliced
s Pointer to the first character in the string to be sliced. May be NULL only if n == 0.


Member Data Documentation

size_t len
 

Number of characters in the slice.

char const* ptr
 

Pointer to the first character in the slice. May be NULL if len == 0.


The documentation for this struct was generated from the following file:

shwild Library documentation © Matthew Wilson and Sean Kelly, 2004-2006 SourceForge.net Logo