Good Stopping Point for 480 Prep
+- Phase6 Preparation to Step 3.
This commit is contained in:
parent
ca321e6c4e
commit
fd87d9a54d
3 changed files with 285 additions and 23 deletions
|
|
@ -15,7 +15,7 @@
|
|||
// string substring find
|
||||
// findSubString
|
||||
// string set to lower
|
||||
// lowerString
|
||||
// toLowerCase
|
||||
// string get to delimiter
|
||||
// stringDelimiter
|
||||
// string get to end of line
|
||||
|
|
@ -110,46 +110,128 @@ Process: captures sub string within larger string
|
|||
between two inclusive indices.
|
||||
returns empty string if either index is out of range,
|
||||
assumes enough memory in dest string
|
||||
Function input/parameters: ???
|
||||
Function output/parameters: NONE
|
||||
Function output/returned: ???
|
||||
Function input/parameters: c-style string (char *)
|
||||
start and end indices (int)
|
||||
Function output/parameters: c-style destination string (char *)
|
||||
Function output/returned: NONE
|
||||
Device input/---: NONE
|
||||
Device output/---: NONE
|
||||
Dependencies: included by standard libraries
|
||||
Dependencies: getStringLength, malloc, copyString, free
|
||||
*/
|
||||
void getSubString(char *destStr, const char *sourceStr,
|
||||
int startIndex, int endIndex)
|
||||
{
|
||||
// no return, void.
|
||||
}
|
||||
|
||||
/*
|
||||
Name: findSubString
|
||||
Process: ???
|
||||
Function input/parameters: ???
|
||||
Process: linear search for given substring within another string
|
||||
Function input/parameters: c-style test string (char *),
|
||||
c-style source string (char *)
|
||||
Function output/parameters: NONE
|
||||
Function output/returned: ???
|
||||
Function output/returned: index of found substring, or
|
||||
SUBSTRING_NOT_FOUND constant
|
||||
if string not found
|
||||
Device input/---: NONE
|
||||
Device output/---: NONE
|
||||
Dependencies: included by standard libraries
|
||||
Dependencies: getStringLength
|
||||
*/
|
||||
int findSubString()
|
||||
{
|
||||
// return zero (temp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Name: ???
|
||||
Process: ???
|
||||
Function input/parameters: ???
|
||||
Function output/parameters: NONE
|
||||
Function output/returned: ???
|
||||
Name: strToLowerCase
|
||||
Process: iterates through string, sets any uppercase letter to lowercase
|
||||
equivalent, does not affect any letter with an upper/lower diff.
|
||||
Function input/parameters: c-style source string (char *)
|
||||
Function output/parameters: c-style dest string (char *)
|
||||
Function output/returned: NONE
|
||||
Device input/---: NONE
|
||||
Device output/---: NONE
|
||||
Dependencies: included by standard libraries
|
||||
Dependencies: toLowerCase
|
||||
*/
|
||||
void strToLowerCase()
|
||||
{
|
||||
// no return, void.
|
||||
}
|
||||
|
||||
/*
|
||||
Name: ???
|
||||
Process: ???
|
||||
Function input/parameters: ???
|
||||
Name: toLowerCase
|
||||
Process: sets character to lowercase letter if uppercase letter,
|
||||
returns character
|
||||
Function input/parameters: character input (char)
|
||||
Function output/parameters: NONE
|
||||
Function output/returned: ???
|
||||
Function output/returned: character output (char)
|
||||
Device input/---: NONE
|
||||
Device output/---: NONE
|
||||
Dependencies: included by standard libraries
|
||||
Dependencies: none
|
||||
*/
|
||||
char toLowerCase()
|
||||
{
|
||||
// return null character (temp)
|
||||
return NULL_CHAR;
|
||||
}
|
||||
|
||||
/*
|
||||
Name: getStringToDelimiter
|
||||
Process: captures a string from the input stream to a specified delimiter.
|
||||
will consume the delimiter.
|
||||
Function input/parameters: input stream (FILE *),
|
||||
stops at specified character
|
||||
Function output/parameters: c-style string (char *)
|
||||
Function output/returned: success of operation (bool)
|
||||
Device input/---: NONE
|
||||
Device output/---: NONE
|
||||
Dependencies: getStringConstrained
|
||||
*/
|
||||
bool getStringToDelimiter(FILE *inStream, char delimiter, char *capString)
|
||||
{
|
||||
// return false (temp)
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
Name: getStringConstrained
|
||||
Process: captures a string from the file stream with various constraints
|
||||
Function input/parameters: input stream (FILE *),
|
||||
clears leading non printable (bool),
|
||||
clears leading space (bool),
|
||||
stops at non printable (bool),
|
||||
stops at specified delimiter (char)
|
||||
will consume the delimiter.
|
||||
Function output/parameters: c-style string (char *)
|
||||
Function output/returned: success of operation (bool)
|
||||
Device input/---: NONE
|
||||
Device output/---: NONE
|
||||
Dependencies: fgetc
|
||||
*/
|
||||
bool getStringConstrained(FILE *inStream, bool clearLeadingNonPrintable,
|
||||
bool clearLeadingSpace, bool stopAtNonPrintable,
|
||||
char delimiter, char *capString)
|
||||
{
|
||||
// return false (temp)
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
Name: getStringToLineEnd
|
||||
Process: captures a string from the input stream to the end of the line
|
||||
Function input/parameters: input file stream (FILE *)
|
||||
Function output/parameters: c-style string (char *)
|
||||
Function output/returned: success of operation (bool)
|
||||
Device input/---: NONE
|
||||
Device output/---: NONE
|
||||
Dependencies: getStringConstrained
|
||||
*/
|
||||
bool getStringToLineEnd(FILE *inStream, char *capString)
|
||||
{
|
||||
// return false (temp)
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
Name: ???
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue