forked from aaronbloomfield/pdr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvutil.h
More file actions
28 lines (19 loc) · 732 Bytes
/
Copy pathsvutil.h
File metadata and controls
28 lines (19 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// utility functions for vectors of string
#ifndef SVUTIL_H
#define SVUTIL_H
#include <vector>
#include <string>
#include <iostream>
using namespace std;
// prints the strings in the vector
void svOutput ( const vector<string> &vect );
// finds a string in a vector and returns its index
int svFind ( const vector<string> &vect, string s);
// removes an element from the vector at index idx
// returns true if remove successful, otherwise false
bool svDeleteAt ( vector<string> &vect, int idx );
// sorts a vector of string in ascending order
void svSort ( vector<string> &vect );
// return the index of the largest string in range index start to end
int svFindMax( const vector<string> &vect, int start, int end );
#endif