Go to the source code of this file.
Classes | |
| struct | Node |
| A node in a doubly linked list. More... | |
Functions | |
| struct Node * | getFirstNode (struct Node *node) |
| Given any node in a list, return the first node in the list. | |
| struct Node * | getLastNode (struct Node *node) |
| Given any node in a list, return the last node in the list. | |
| void | insertBefore (struct Node *rootNode, struct Node *newNode) |
| Insert newNode in the list before rootNode. | |
| void | insertAfter (struct Node *rootNode, struct Node *newNode) |
| Insert newNode in the list after rootNode. | |
| void | deleteNode (struct Node *node) |
| Delete the node from the list. | |
| struct Node * | searchList (struct Node *node, char *searchString) |
| Search the list for a node containing searchString. | |
| char * | joinList (struct Node *node, char *joinString) |
| Join the strings in a list on a given string. | |
| void deleteNode | ( | struct Node * | node | ) |
Delete the node from the list.
Removes the given node from the list. This is done by linking it's previous and next nodes to each other, and setting the given nodes previous and next fields to NULL. Note that the memory used by the Node is not freed.
| char* joinList | ( | struct Node * | node, | |
| char * | joinString | |||
| ) |
Join the strings in a list on a given string.
Given any node in a list, and a string, return the strings of all the nodes in the list in list order with joinString inserted inbetween each one. EG if the list contains ['foo', 'bar'], and it is joined with 'ack', the result will be 'fooackbar'.
Search the list for a node containing searchString.
Given any node in a list, search the list for a node containing the given search string and return a pointer to that node. Searches forwards, then backwards from given node.
1.5.3