aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/SString.h
diff options
context:
space:
mode:
authornyamatongwe <unknown>2001-02-24 01:07:27 +0000
committernyamatongwe <unknown>2001-02-24 01:07:27 +0000
commit138a83285e148f933d9d8105d0b6a3f8d5c434bc (patch)
treef98810687b579e1a3b3db21227ec71ffc1b906d4 /include/SString.h
parentd21110c144c7ef998b76d3fde4954a811531c319 (diff)
downloadscintilla-mirror-138a83285e148f933d9d8105d0b6a3f8d5c434bc.tar.gz
Updated documentation comments from Philippe.
Diffstat (limited to 'include/SString.h')
-rw-r--r--include/SString.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/SString.h b/include/SString.h
index df9c88c83..9392e8053 100644
--- a/include/SString.h
+++ b/include/SString.h
@@ -1,8 +1,9 @@
// SciTE - Scintilla based Text Editor
-// SString.h - a simple string class
+/** @file SString.h
+ ** A simple string class.
+ **/
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
-/** @file **/
#ifndef SSTRING_H
#define SSTRING_H
@@ -16,11 +17,12 @@ bool EqualCaseInsensitive(const char *a, const char *b);
// While it would be 'better' to use std::string, that doubles the executable size.
// An SString may contain embedded nul characters.
-/** Duplicate a C string.
+/**
+ * Duplicate a C string.
* Allocate memory of the given size, or big enough to fit the string if length isn't given;
* then copy the given string in the allocated memory.
* @return the pointer to the new string
- **/
+ */
inline char *StringDup(
const char *s, ///< The string to duplicate
int len=-1) ///< The length of memory to allocate. Optional.
@@ -37,7 +39,8 @@ inline char *StringDup(
return sNew;
}
-/** A simple string class.
+/**
+ * @brief A simple string class.
* Hold the length of the string for quick operations,
* can have a buffer bigger than the string to avoid too many memory allocations and copies.
* May have embedded zeroes as a result of @a substitute, but rely too heavily on C string
@@ -96,13 +99,15 @@ public:
const char* end(void) const {
return &s[slen]; // Point after the last character
}
- size_type size(void) const { // Size of buffer
+ /** Size of buffer. */
+ size_type size(void) const { ///<
if (s)
return ssize;
else
return 0;
}
- int length() const { // Size of string in buffer
+ /** Size of string in buffer. */
+ int length() const {
return slen;
}
SString &assign(const char* sother, int size_ = -1) {