Sha256: 5862e2aa1551b2863ea13de68edc7e3e7830a92c203dd466710999fd08cc8eca

Contents?: true

Size: 969 Bytes

Versions: 133

Compression:

Stored size: 969 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 series_results {
   unsigned int substring_count;
   char **substring;            // array of pointers of dimension substring_count
} series_results_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.
series_results_t series(char *input_text, unsigned int substring_length);

#endif

Version data entries

133 entries across 133 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/c/exercises/series/src/series.h
trackler-2.2.1.179 tracks/c/exercises/series/src/series.h
trackler-2.2.1.178 tracks/c/exercises/series/src/series.h
trackler-2.2.1.177 tracks/c/exercises/series/src/series.h
trackler-2.2.1.176 tracks/c/exercises/series/src/series.h
trackler-2.2.1.175 tracks/c/exercises/series/src/series.h
trackler-2.2.1.174 tracks/c/exercises/series/src/series.h
trackler-2.2.1.173 tracks/c/exercises/series/src/series.h
trackler-2.2.1.172 tracks/c/exercises/series/src/series.h
trackler-2.2.1.171 tracks/c/exercises/series/src/series.h
trackler-2.2.1.170 tracks/c/exercises/series/src/series.h
trackler-2.2.1.169 tracks/c/exercises/series/src/series.h
trackler-2.2.1.167 tracks/c/exercises/series/src/series.h
trackler-2.2.1.166 tracks/c/exercises/series/src/series.h
trackler-2.2.1.165 tracks/c/exercises/series/src/series.h
trackler-2.2.1.164 tracks/c/exercises/series/src/series.h
trackler-2.2.1.163 tracks/c/exercises/series/src/series.h
trackler-2.2.1.162 tracks/c/exercises/series/src/series.h
trackler-2.2.1.161 tracks/c/exercises/series/src/series.h
trackler-2.2.1.160 tracks/c/exercises/series/src/series.h