summaryrefslogtreecommitdiffstats
path: root/chrome/tools/convert_dict/hunspell_reader.h
blob: a19bba3e55d687165732837274d07e39f2d6c0c2 (plain)
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
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_TOOLS_CONVERT_DICT_HUNSPELL_READER_H_
#define CHROME_TOOLS_CONVERT_DICT_HUNSPELL_READER_H_

#include <string>

// Common routines for reading hunspell files.
namespace convert_dict {

// Reads one line and returns it. Whitespace will be trimmed.
std::string ReadLine(FILE* file);

// Trims whitespace from the beginning and end of the given string. Also trims
// UTF-8 byte order markers from the beginning.
void TrimLine(std::string* line);

// Strips any comments for the given line.
void StripComment(std::string* line);

}  // namespace convert_dict

#endif  // CHROME_TOOLS_CONVERT_DICT_HUNSPELL_READER_H_