The object is to create a library of string functions that will be useful and friendly to use in future assignments. Naturally it is to be programmed in BCPL. Use the second implementation style that we examined in class: A small vec represents the whole string containing information necessary for efficiency and a pointer to another vec that holds the characters. No wasted space. All of the functions must work on these proper string objects. This is as illustrated in the class notes in the "strings-two" link. A lot of the required functions appear more-or-less exactly as you'll need them in that sample code. If you have an sense you will not just copy and paste those definitions and jump in with the new requirements. If you re-think the things we looked at in class and are provided in that example, you will find the new requirements much easier. Give all of your functions sensible names that make it very clear what they do. Strings will not be the only objects you ever create, so something to indicate that these functions should operate only on strings should be part of the name. 1. Make five constructor functions one creates an empty string with no capacity. one creates an empty string with capacity given by a parameter one creates a string with the same content as an existing string, supplied as a parameter. Do not share the character vec. one creates a string object containing exactly the characters of the normal BCPL string provided as a character. one creates a string initialised with a whole line of characters typed by the user, do not include the \n that terminates the line. 2. Make the following four almost trivial functions one prints a string given as a parameter. one acts as a destructor, recycling all memory used for a given string. one has two parameters, a string and an int, and returns the character at the indicated position in the string. If the position is not in range return -1. one takes three parameters, a string, and int i, and a character c) and changes character i of the string to c. if i is < 0 or >= length do nothing but return -1. Otherwise set the character and return 1. 3. Make some utility functions: one that returns the length of a string one that returns true or false depending on whether or not the entire string has the proper form for an int: optionally an initial + or -, then at least one decimal digit. No spaces or other characters. one that assumes the string does look like an int, and returns that int value, so string_to_int("1726") returns 1726 (no quotes) one that compares two strings, the return value should be the same as the C strcmp function would return, except that it should really be strcasecmp, capital and lower case letters should be considered to be equal. 4. Make three append functions one adds a single character to the end of a string. one adds the entire content of one string to the end of another. Do not do this by repeatedly using the single character append function, the string that grows should be resized at most once for this operation. one adds an int to the end of an existing string, character by character, so the result of appending the string "abcde" and the int 8461 is "abcde8461". 5. Adapt the code from the "stringstream_two" link so that it works on the strings you have just created. There is a fair chance that it already will work on your strings. That isn't a problem.