aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/wcstringutil.h
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-05-03 15:18:24 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-05-03 16:09:45 -0700
commit5c8763be0e68bbdec3fdd1edb5754f4c421098e1 (patch)
tree8b9a5068fa2f87d0a97c61df1336cd083c6b1504 /src/wcstringutil.h
parentee44879d4d6ae28968885823db5f0ce13e5a6dec (diff)
restyle remaining modules to match project style
For this change I decided to bundle the remaining modules that need to be resytyled because only two were large enough to warrant doing on their own. Reduces lint errors from 225 to 162 (-28%). Line count from 3073 to 2465 (-20%). Another step in resolving issue #2902.
Diffstat (limited to 'src/wcstringutil.h')
-rw-r--r--src/wcstringutil.h31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/wcstringutil.h b/src/wcstringutil.h
index d2feec07..ea4489e7 100644
--- a/src/wcstringutil.h
+++ b/src/wcstringutil.h
@@ -1,7 +1,4 @@
-/** \file wcstringutil.h
-
-Helper functions for working with wcstring
-*/
+// Helper functions for working with wcstring.
#ifndef FISH_WCSTRINGUTIL_H
#define FISH_WCSTRINGUTIL_H
@@ -10,21 +7,19 @@ Helper functions for working with wcstring
#include "common.h"
-/**
- typedef that represents a range in a wcstring.
- The first element is the location, the second is the count.
-*/
+/// Typedef that represents a range in a wcstring. The first element is the location, the second is
+/// the count.
typedef std::pair<wcstring::size_type, wcstring::size_type> wcstring_range;
-/**
- wcstring equivalent of wcstok(). Supports NUL.
- For convenience and wcstok() compatibility, the first character of each
- token separator is replaced with NUL.
- Returns a pair of (pos, count).
- Returns (npos, npos) when it's done.
- Returns (pos, npos) when the token is already known to be the final token.
- Note that the final token may not necessarily return (pos, npos).
-*/
-wcstring_range wcstring_tok(wcstring& str, const wcstring &needle, wcstring_range last = wcstring_range(0,0));
+/// wcstring equivalent of wcstok(). Supports NUL. For convenience and wcstok() compatibility, the
+/// first character of each token separator is replaced with NUL.
+///
+/// Returns a pair of (pos, count).
+/// Returns (npos, npos) when it's done.
+/// Returns (pos, npos) when the token is already known to be the final token.
+///
+/// Note that the final token may not necessarily return (pos, npos).
+wcstring_range wcstring_tok(wcstring& str, const wcstring& needle,
+ wcstring_range last = wcstring_range(0, 0));
#endif