Sha256: b2ef3d64edaa529efe6ac959b3885f51ad70c249c7b4294b55ea213ea4761af0

Contents?: true

Size: 962 Bytes

Versions: 201

Compression:

Stored size: 962 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

201 entries across 201 versions & 1 rubygems

Version Path
trackler-2.2.1.45 tracks/c/exercises/series/src/series.h
trackler-2.2.1.44 tracks/c/exercises/series/src/series.h
trackler-2.2.1.43 tracks/c/exercises/series/src/series.h
trackler-2.2.1.42 tracks/c/exercises/series/src/series.h
trackler-2.2.1.41 tracks/c/exercises/series/src/series.h
trackler-2.2.1.40 tracks/c/exercises/series/src/series.h
trackler-2.2.1.39 tracks/c/exercises/series/src/series.h
trackler-2.2.1.38 tracks/c/exercises/series/src/series.h
trackler-2.2.1.37 tracks/c/exercises/series/src/series.h
trackler-2.2.1.36 tracks/c/exercises/series/src/series.h
trackler-2.2.1.35 tracks/c/exercises/series/src/series.h
trackler-2.2.1.34 tracks/c/exercises/series/src/series.h
trackler-2.2.1.33 tracks/c/exercises/series/src/series.h
trackler-2.2.1.32 tracks/c/exercises/series/src/series.h
trackler-2.2.1.31 tracks/c/exercises/series/src/series.h
trackler-2.2.1.30 tracks/c/exercises/series/src/series.h
trackler-2.2.1.29 tracks/c/exercises/series/src/series.h
trackler-2.2.1.28 tracks/c/exercises/series/src/series.h
trackler-2.2.1.27 tracks/c/exercises/series/src/series.h
trackler-2.2.1.26 tracks/c/exercises/series/src/series.h