Sha256: e62a7717ff366098e2d7655db5dbde2591c67e6a01419528f2b8a9c83dee7a95

Contents?: true

Size: 964 Bytes

Versions: 39

Compression:

Stored size: 964 Bytes

Contents

#ifndef _SERIES_H
#define _SERIES_H

#define MAX_INPUT_TEXT_LENGTH (8)
#define MAX_SERIES_RESULTS (MAX_INPUT_TEXT_LENGTH)
#define MAX_SERIES_LENGTH (5)

// results structure
typedef struct SeriesResults {
   unsigned int substringCount;
   char **substring;            // array of pointers of dimension substringCount
} SeriesResults_t;

// series - routine to split up input text into consecutive substrings of text of a given substringLength
//
// inputs:
//    inputText - bounded to MAX_INPUT_TEXT_LENGTH
//    substringLength - the desired length of substrings that are returned bounded to MAX_SERIES_LENGTH
//
// outputs:
//    SeriesResult_t results - structure containing count of the substring and an array of
//       pointers to the substrings.
//
//       calling routine will free memory associated with each of the substrings and
//       the pointers to the substrings.
SeriesResults_t series(char *inputText, unsigned int substringLength);

#endif

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
trackler-2.0.6.6 tracks/c/exercises/series/src/series.h
trackler-2.0.6.5 tracks/c/exercises/series/src/series.h
trackler-2.0.6.4 tracks/c/exercises/series/src/series.h
trackler-2.0.6.3 tracks/c/exercises/series/src/series.h
trackler-2.0.6.2 tracks/c/exercises/series/src/series.h
trackler-2.0.6.1 tracks/c/exercises/series/src/series.h
trackler-2.0.6.0 tracks/c/exercises/series/src/series.h
trackler-2.0.5.18 tracks/c/exercises/series/src/series.h
trackler-2.0.5.17 tracks/c/exercises/series/src/series.h
trackler-2.0.5.16 tracks/c/exercises/series/src/series.h
trackler-2.0.5.15 tracks/c/exercises/series/src/series.h
trackler-2.0.5.14 tracks/c/exercises/series/src/series.h
trackler-2.0.5.13 tracks/c/exercises/series/src/series.h
trackler-2.0.5.12 tracks/c/exercises/series/src/series.h
trackler-2.0.5.11 tracks/c/exercises/series/src/series.h
trackler-2.0.5.10 tracks/c/exercises/series/src/series.h
trackler-2.0.5.9 tracks/c/exercises/series/src/series.h
trackler-2.0.5.8 tracks/c/exercises/series/src/series.h
trackler-2.0.5.7 tracks/c/exercises/series/src/series.h
trackler-2.0.5.6 tracks/c/exercises/series/src/series.h