-
Notifications
You must be signed in to change notification settings - Fork 4
/
Utils.h
27 lines (24 loc) · 862 Bytes
/
Utils.h
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
/* This file is a part of EAS Encoder.
*
* Copyright (C) 2018 Matthew Burket
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*/
#ifndef SAMEENCODER_UTILS_H
#define SAMEENCODER_UTILS_H
#include <vector>
#include <string>
/**
* This class has various helper methods
*/
class Utils {
public:
static void string_to_bit_stream(std::vector<bool> &vector, std::string message);
static void bit_string_to_bit_stream(std::vector<bool> &vector, std::string bitstring);
static std::string zero_pad_int(int num, int totalLength);
static std::string zero_pad_int(const std::string &old_string, int totalLength);
};
#endif //SAMEENCODER_UTILS_H