|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
|
PUBLIC |
RCSFileBodyC::RCSFileBodyC(const FilenameC &)
RCSFileBodyC::RCSFileBodyC(const StringC &)
RCSFileBodyC::IsCheckedOut(void)
RCSFileBodyC::CheckOut(void)
RCSFileBodyC::NeedsUpdate(void)
RCSFileBodyC::CheckIn(StringC)
RCSFileBodyC::CheckOutUL(StringC,FilenameC)
RCSFileBodyC::Update(void)
RCSFileBodyC::AddUser(const StringC &)
RCSFileBodyC::RemoveUser(const StringC &)
RCSFileBodyC::UsesRCS(void)
RCSFileBodyC::IsDifferent(FilenameC,StringC)
RCSFileBodyC::IsDiffFromHead(void)
RCSFileBodyC::ParseRCS(void)
RCSFileBodyC::ExtractInital(StringC &,StringC &)
RCSFileBodyC::HasAccess(const UserInfoC &)
RCSFileBodyC::IsAvailable(void)
RCSFileBodyC::HeadVersion(void)
RCSFileBodyC::HasChangedFrom(RCSVersionC)
RCSFileBodyC::HasChangedFrom(const RCSFileC &,RCSVersionC)
RCSFileBodyC::VerDiff(const FilenameC &)
RCSFileBodyC::LockedBy(const RCSVersionC &)
RCSFileBodyC::ListLogEntries(void)
RCSFileBodyC::Possess(BooleanT)
RCSFileBodyC::DBFilename(void)
RCSFileBodyC::GetEntry(istream &)
RCSFileBodyC::Unstuff(const StringC &,int)
RCSFileBodyC::ReadDate(StringC)
RCSFileBodyC::DateRCS2DMY(StringC)
RCSFileBodyC::DateRCS2DateC(StringC)
BodyRefCounterC::AddReference(void)
BodyRefCounterC::RemoveReference(void)
BodyRefCounterC::SetConst(void) const
BodyRefCounterC::SetConst(void)
BodyRefCounterC::IsConst(void) const
BodyRefCounterC::IsNotConst(void) const
BodyRefCounterC::ToBeDeleted(void) const
BodyRefCounterC::ToBeDeletedRemoveIgnoreNoRemove(void)
BodyRefCounterC::ToBeDeletedRemove(void)
BodyRefCounterC::BodyMightBeDeleted(void) const
BodyRefCounterC::IsCountZero(void) const
BodyRefCounterC::BRCPtrCanDeleteObject(void) const
BodyRefCounterC::Count(void) const
BodyRefCounterC::operator=(const BodyRefCounterC &)
BodyRefCounterC::IsValidObject(void) const
BodyRefCounterC::UserBitTest(IntT) const
BodyRefCounterC::UserBitSet(IntT,BooleanT)
BodyRefCounterC::UserBitZero(IntT)
BodyRefCounterC::ReportBRCError(char *)
BodyRefCounterC::Hash(void) const
BodyRefCounterC::SetUndeletable(void)
BodyRefCounterC::ReportInvalidObject(char *) const
FilenameC::MakeDir(const FilePermissionC &) const
FilenameC::Exists(void) const
FilenameC::Rename(const StringC &) const
FilenameC::IsReadable(void) const
FilenameC::IsWritable(void) const
FilenameC::IsDirectory(void) const
FilenameC::IsFifo(void) const
FilenameC::IsRegular(void) const
FilenameC::Permissions(void) const
FilenameC::SetPermissions(const FilePermissionC &)
FilenameC::PathComponent(void) const
FilenameC::NameComponent(void) const
FilenameC::MkTemp(IntT,IntT) const
FilenameC::LastAccessTime(void) const
FilenameC::LastModTime(void) const
FilenameC::LastStatusModTime(void) const
FilenameC::FileSize(void) const
FilenameC::Remove(void) const
FilenameC::OwnerInfo(void) const
FilenameC::CopyTo(const FilenameC &) const
FilenameC::BinCompair(const FilenameC &) const
FilenameC::Absolute(BooleanT) const
FilenameC::SetAMDPrefix(StringC)
FilenameC::HasExtension(StringC,BooleanT) const
FilenameC::Extension(void) const
FilenameC::Search(StringC) const
FilenameC::Search(const DListC &) const
FilenameC::operator=(const FilenameC &)
FilenameC::operator=(const StringC &)
FilenameC::operator=(const SubStringC &)
FilenameC::operator=(const char *)
RefCounterBaseC::Label(void) const
StringC::search(int,int,const char *,int) const
StringC::search(int,int,char) const
StringC::match(int,int,int,const char *,int) const
StringC::_gsub(const char *,int,const char *,int)
StringC::_gsub(const Regex &,const char *,int)
StringC::_substr(int,int)
StringC::Copy(void) const
StringC::Hash(void) const
StringC::operator=(const StringC &)
StringC::operator=(const char *)
StringC::operator=(char)
StringC::operator=(const SubStringC &)
StringC::operator+=(const StringC &)
StringC::operator+=(const SubStringC &)
StringC::operator+=(const char *)
StringC::operator+=(char)
StringC::prepend(const StringC &)
StringC::prepend(const SubStringC &)
StringC::prepend(const char *)
StringC::prepend(char)
StringC::cat(const StringC &,const StringC &,StringC &)
StringC::cat(const StringC &,const SubStringC &,StringC &)
StringC::cat(const StringC &,const char *,StringC &)
StringC::cat(const StringC &,char,StringC &)
StringC::cat(const SubStringC &,const StringC &,StringC &)
StringC::cat(const SubStringC &,const SubStringC &,StringC &)
StringC::cat(const SubStringC &,const char *,StringC &)
StringC::cat(const SubStringC &,char,StringC &)
StringC::cat(const char *,const StringC &,StringC &)
StringC::cat(const char *,const SubStringC &,StringC &)
StringC::cat(const char *,const char *,StringC &)
StringC::cat(const char *,char,StringC &)
StringC::cat(const StringC &,const StringC &,const StringC &,StringC &)
StringC::cat(const StringC &,const StringC &,const SubStringC &,StringC &)
StringC::cat(const StringC &,const StringC &,const char *,StringC &)
StringC::cat(const StringC &,const StringC &,char,StringC &)
StringC::cat(const StringC &,const SubStringC &,const StringC &,StringC &)
StringC::cat(const StringC &,const SubStringC &,const SubStringC &,StringC &)
StringC::cat(const StringC &,const SubStringC &,const char *,StringC &)
StringC::cat(const StringC &,const SubStringC &,char,StringC &)
StringC::cat(const StringC &,const char *,const StringC &,StringC &)
StringC::cat(const StringC &,const char *,const SubStringC &,StringC &)
StringC::cat(const StringC &,const char *,const char *,StringC &)
StringC::cat(const StringC &,const char *,char,StringC &)
StringC::cat(const char *,const StringC &,const StringC &,StringC &)
StringC::cat(const char *,const StringC &,const SubStringC &,StringC &)
StringC::cat(const char *,const StringC &,const char *,StringC &)
StringC::cat(const char *,const StringC &,char,StringC &)
StringC::cat(const char *,const SubStringC &,const StringC &,StringC &)
StringC::cat(const char *,const SubStringC &,const SubStringC &,StringC &)
StringC::cat(const char *,const SubStringC &,const char *,StringC &)
StringC::cat(const char *,const SubStringC &,char,StringC &)
StringC::cat(const char *,const char *,const StringC &,StringC &)
StringC::cat(const char *,const char *,const SubStringC &,StringC &)
StringC::cat(const char *,const char *,const char *,StringC &)
StringC::cat(const char *,const char *,char,StringC &)
StringC::index(char,int) const
StringC::index(const StringC &,int) const
StringC::index(const SubStringC &,int) const
StringC::index(const char *,int) const
StringC::index(const Regex &,int) const
StringC::contains(char) const
StringC::contains(const StringC &) const
StringC::contains(const SubStringC &) const
StringC::contains(const char *) const
StringC::contains(const Regex &) const
StringC::contains(char,int) const
StringC::contains(const StringC &,int) const
StringC::contains(const SubStringC &,int) const
StringC::contains(const char *,int) const
StringC::contains(const Regex &,int) const
StringC::matches(char,int) const
StringC::matches(const StringC &,int) const
StringC::matches(const SubStringC &,int) const
StringC::matches(const char *,int) const
StringC::matches(const Regex &,int) const
StringC::CaseCmp(const StringC &) const
StringC::freq(char) const
StringC::freq(const StringC &) const
StringC::freq(const SubStringC &) const
StringC::freq(const char *) const
StringC::at(int,int)
StringC::operator()(int,int)
StringC::at(const StringC &,int)
StringC::at(const SubStringC &,int)
StringC::at(const char *,int)
StringC::at(char,int)
StringC::at(const Regex &,int)
StringC::before(int)
StringC::before(const StringC &,int)
StringC::before(const SubStringC &,int)
StringC::before(const char *,int)
StringC::before(char,int)
StringC::before(const Regex &,int)
StringC::through(int)
StringC::through(const StringC &,int)
StringC::through(const SubStringC &,int)
StringC::through(const char *,int)
StringC::through(char,int)
StringC::through(const Regex &,int)
StringC::from(int)
StringC::from(const StringC &,int)
StringC::from(const SubStringC &,int)
StringC::from(const char *,int)
StringC::from(char,int)
StringC::from(const Regex &,int)
StringC::after(int)
StringC::after(const StringC &,int)
StringC::after(const SubStringC &,int)
StringC::after(const char *,int)
StringC::after(char,int)
StringC::after(const Regex &,int)
StringC::del(int,int)
StringC::del(const StringC &,int)
StringC::del(const SubStringC &,int)
StringC::del(const char *,int)
StringC::del(char,int)
StringC::del(const Regex &,int)
StringC::gsub(const StringC &,const StringC &)
StringC::gsub(const SubStringC &,const StringC &)
StringC::gsub(const char *,const StringC &)
StringC::gsub(const char *,const char *)
StringC::gsub(const Regex &,const StringC &)
StringC::split(const StringC &,StringC,int,const StringC &)
StringC::split(const StringC &,StringC,int,const Regex &)
StringC::common_prefix(const StringC &,const StringC &,int)
StringC::common_suffix(const StringC &,const StringC &,int)
StringC::StrCreplicate(char,int)
StringC::StrCreplicate(const StringC &,int)
StringC::StrCreplicateStrC(const StringC &,int)
StringC::join(StringC,int,const StringC &)
StringC::reverse(const StringC &)
StringC::upcase(const StringC &)
StringC::downcase(const StringC &)
StringC::capitalize(const StringC &)
StringC::reverse(void)
StringC::upcase(void)
StringC::downcase(void)
StringC::capitalize(void)
StringC::operator[](MUIndexT)
StringC::operator[](MUIndexT) const
StringC::operator[](IndexT)
StringC::operator[](IndexT) const
StringC::operator[](int)
StringC::operator[](int) const
StringC::elem(int) const
StringC::firstchar(void) const
StringC::lastchar(void) const
StringC::operator const char *(void) const
StringC::chars(void) const
StringC::operator<<(ostream &,const StringC &)
StringC::operator<<(ostream &,const SubStringC &)
StringC::operator>>(istream &,StringC &)
StringC::operator>>(BinIStreamC &,StringC &)
StringC::readline(istream &,StringC &,char,int)
StringC::length(void) const
StringC::empty(void) const
StringC::IsEmpty(void) const
StringC::alloc(int)
StringC::allocation(void) const
StringC::Size(void) const
StringC::error(const char *)
StringC::OK(void) const
StringC::TopAndTail(void) const
|
Parent Classes:
Variables:
- BooleanT rcsParsed;
-
Set to true after RCS file is parsed.
- BooleanT usesRCS;
-
Does actual use RCS, only valid if rcsParsed is TRUE.
- FilenameC dbFilename;
-
- DListC access;
-
Access list.
- DListC> locks;
-
- RCSVersionC head;
-
Head version.
Methods:
- RCSFileBodyC(const FilenameC & aname)
-
Construct from a filename.
- RCSFileBodyC(const StringC & aname)
-
Construct from a string.
- BooleanT IsCheckedOut()
-
Is file checked out ?
- BooleanT CheckOut()
-
Check out file.
Return TRUE=Operation succeded.
- BooleanT NeedsUpdate()
-
Check the time stamps on the file to see if update is needed.
- BooleanT CheckIn(StringC cimsg = "RCSFileC Checkin")
-
Check in file.
Return TRUE=Operation succeded.
- StringC CheckOutUL(StringC version = "",FilenameC dest = ".")
-
Checkout a unlocked version of this file to somewhere.
dest is a directory in which to put the file.
Returns name of checkedout file, or empty string if failed.
- BooleanT Update()
-
Make sure unlocked file is up to date.
- BooleanT AddUser(const StringC & login)
-
Add user to access list.
- BooleanT RemoveUser(const StringC & login)
-
Remove user from access list.
- BooleanT UsesRCS()
-
Test if file has an RCS database.
- BooleanT IsDifferent(FilenameC other,StringC vers = "")
-
Is this file different from some other version of a particular file.
- BooleanT IsDiffFromHead()
-
Test if current version of file is different from head.
- BooleanT ParseRCS()
-
Extract info from RCS file.
- BooleanT ExtractInital(StringC & author,StringC & date)
-
Who originaly checkin in the file and the date it happened.
- BooleanT HasAccess(const UserInfoC & auser)
-
Test if a user has access.
- BooleanT IsAvailable()
-
Test if file is available to modify.
User must have access to file and it can't be
locked by anyone else.
- RCSVersionC HeadVersion()
-
Get head version.
- BooleanT HasChangedFrom(RCSVersionC fromVer)
-
Has file changed from version 'fromVer' ?
- BooleanT HasChangedFrom(const RCSFileC & oth,RCSVersionC fromVer)
-
Has file changed from version 'fromVer' of oth ?
Similar to IsDifferent()
- BooleanT VerDiff(const FilenameC & othFn)
-
Do a text file diff.
ignoring difference between RCS id info.
this only ignores content of xxx in lines containing $id:xxx$
(with a capital I in id. )
- UserInfoC LockedBy(const RCSVersionC & aver)
-
Which has a partiuclar revision locked.
Returns an invalid UserInfoC if none.
- DListC<Tuple4C<DateC,StringC,RCSVersionC,StringC>> ListLogEntries()
-
List all log entries after version afterVer.
Tuple4 Contains
1 - Date of mod
2 - Author.
3 - Version no.
4 - Comment.
- BooleanT Possess(BooleanT verbose = FALSE)
-
Possess file.
Change owner ship of RCS db file to that of the
the current user. (If possible).
NB. This user must own the RCS directory!
- FilenameC DBFilename()
-
Get the RCS file name itself.
- StringC GetEntry(istream & in)
-
Extract next entry from RCS file.
reads upto the next ';' charactor.
the ';' is discarded.
- StringC Unstuff(const StringC & str,int startat = 0)
-
Unstuff first string after 'startat'
- DateC ReadDate(StringC str)
-
Convert date from rcs form.
- StringC DateRCS2DMY(StringC str)
-
Convert a rcs date to day month year format.
- DateC DateRCS2DateC(StringC str)
-
Convert a rcs date to DateC format.
- void AddReference()
-
Another reference to the object has been created.
- void RemoveReference()
-
One reference to the object was deleted.
Locking scheme
--------------
The object is possible to lock (to make constant). The scheme
assumes that the object is created, it can be locked, after that
it can only be destroyed. The locked object cannot be unlocked.
This locking scheme is very useful
during debugging, using assert() function,
when it is necassary to check that object
is treated as constant and the constancy is not violated by
any casting or passing through the copy constructor of shared
objects.
- void SetConst(void) const
-
This locks the object.
Often objects you wish to lock are already const.
- void SetConst(void)
-
This locks the object.
- BooleanT IsConst(void) const
-
Returns TRUE if the object is locked, ie. it is assumed to be constant.
- BooleanT IsNotConst(void) const
-
Returns TRUE if the object is unlocked.
ie. there is no special
information if the object is constant or not.
Counter state information
-------------------------
- BooleanT ToBeDeleted() const
-
Returns TRUE if there is only one reference to the object and the whole object or its reference counting part can be deleted.
- BooleanT ToBeDeletedRemoveIgnoreNoRemove()
-
Decrement refrence by 1 return true if this leaves no refrences to the object.
- BooleanT ToBeDeletedRemove()
-
Decrement refrence by 1 return true if this leaves no refrences to the object. This also checks the NoRemove flag.
- BooleanT BodyMightBeDeleted() const
-
Returns TRUE if the reference counted part of the object can be deleted, ie. flag NOREMOVE is false .
- BooleanT IsCountZero() const
-
Are there any refrences left ?
- BooleanT BRCPtrCanDeleteObject() const
-
Used by BRRCPtrC to establish if an object has ZERO refrences and can be deleted.
- IntT Count() const
-
Returns the current state of the counter, ie. how many references to this object exist.
- const BodyRefCounterC & operator=(const BodyRefCounterC & b)
-
It has not meaning to assign object 'b' to this object because it would destroy a history of the object which is counted. So this is a dummy function.
- BooleanT IsValidObject() const
-
Test if object is valid.
When amma check is disabled this always returns true.
- BooleanT UserBitTest(IntT x) const
-
Test user flag.
- void UserBitSet(IntT x,BooleanT setit = TRUE)
-
Test user flag.
- void UserBitZero(IntT x)
-
Set bit to zero.
- void ReportBRCError(char * Msg)
-
Report error, used in BRCPtrC.
- UIntT Hash() const
-
Hash on address of object.
- void SetUndeletable()
-
Make object undeletable.
Usefull to prevent recursive deleting in graph structures.
Only hackers need this function.
- void ReportInvalidObject(char * Msg = 0) const
-
Tell user about validation failure.
- BooleanT MakeDir(const FilePermissionC & Acc = FilePermissionC()) const
-
Make a directory with this name.
Return: TRUE = Directory created ok.
- BooleanT Exists() const
-
Test if the file/directory given in this path exists.
Return: TRUE = File does exist.
- BooleanT Rename(const StringC & newname) const
-
Rename file.
This does NOT change the value of this filename.
Ret TRUE=Succeeded.
- BooleanT IsReadable() const
-
Test if the file/directory is readable by this process.
Return: TRUE = It can be read.
- BooleanT IsWritable() const
-
Test if the file/directory is writable by this process.
Return: TRUE = It can be written to.
- BooleanT IsDirectory() const
-
Test if the this is a directory.
Return: TRUE = Yep.
- BooleanT IsFifo() const
-
Test if the this is a pipe
Return: TRUE = Yep.
- BooleanT IsRegular() const
-
Test if the this is a regular file ?
Return: TRUE = Yep.
- FilePermissionC Permissions() const
-
Get the access permisions for this file.
Returns no-permisions if file is not found.
- BooleanT SetPermissions(const FilePermissionC & perm)
-
Set the access permisions for this file.
Returns false if failed.
- FilenameC PathComponent() const
-
Return the path component of a Filename, ie. upto last /
- FilenameC NameComponent() const
-
Return the name component of a Filename, ie. after last /
- FilenameC MkTemp(IntT Digits = 4,IntT maxretry = 100) const
-
Make this filename unique by appending a unique string and checking if it doesn't exist already.
If it does try another, if process failes more than
maxretry times, then an ErrorOperationFailedC is thrown
If maxretry is negative infinite retries are alowed.
Digits should be betwee 0 and 6.
- DateC LastAccessTime() const
-
Get last file access.
- DateC LastModTime() const
-
Get last modification time.
- DateC LastStatusModTime() const
-
Get last status modification time.
- UIntT FileSize() const
-
Get size of file.
Return 0 if file's not found.
- BooleanT Remove() const
-
Remove this file.
- UserInfoC OwnerInfo() const
-
Get information on owner of file.
- BooleanT CopyTo(const FilenameC & oth) const
-
Copy this file to somewhere else.
- BooleanT BinCompair(const FilenameC & oth) const
-
Are two files identical. byte wise comparison.
NB. Currently uses diff, may not be true binary comparison.
- FilenameC Absolute(BooleanT removeAMD = TRUE) const
-
Make an absolute path.
If removeAMD is TRUE, any automount prefix will also
be remove from the path.
- void SetAMDPrefix(StringC prefix)
-
Set the AMD prefix.
- BooleanT HasExtension(StringC ext,BooleanT caseSens = FALSE) const
-
Test if filename has the given extention.
caseSens = FALSE means case is ignored.
- StringC Extension() const
-
Get the extention on the file name.
That is the text after the last '.' in the name component.
Returns empty string if none found.
- FilenameC Search(StringC pathList) const
-
Search through ':' seperated list pathList of deriectories for this filename.
Returns this filename if is not found on path.
- FilenameC Search(const DListC<StringC> & pathList) const
-
Search through a list of paths for this file.
Returns this filename if is not found on path.
Usefull for searching through the 'PATH' enviroment variable.
- const FilenameC & operator=(const FilenameC & s)
-
Assign from filename
- const FilenameC & operator=(const StringC & s)
-
Assign from string.
- const FilenameC & operator=(const SubStringC & s)
-
Assign from sub string
- const FilenameC & operator=(const char * s)
-
Assign from char string.
- LabelT Label() const
-
Returns the label of this reference counter.
The member function
is useful mainly to recognize objects during debugging.
The value of the label is uniquely defined pointer.
- int search(int,int,const char *,int = -1) const
-
- int search(int,int,char) const
-
- int match(int,int,int,const char *,int = -1) const
-
- int _gsub(const char *,int,const char *,int)
-
- int _gsub(const Regex &,const char *,int)
-
- SubStringC _substr(int,int)
-
- StringC Copy(void) const
-
- unsigned int Hash(void) const
-
Create a hash value that is "fairly unique" for string.
- StringC & operator=(const StringC & y)
-
- StringC & operator=(const char * y)
-
- StringC & operator=(char c)
-
- StringC & operator=(const SubStringC & y)
-
concatenation
- StringC & operator+=(const StringC & y)
-
- StringC & operator+=(const SubStringC & y)
-
- StringC & operator+=(const char * t)
-
- StringC & operator+=(char c)
-
- void prepend(const StringC & y)
-
- void prepend(const SubStringC & y)
-
- void prepend(const char * t)
-
- void prepend(char c)
-
- void cat(const StringC &,const StringC &,StringC &)
-
- void cat(const StringC &,const SubStringC &,StringC &)
-
- void cat(const StringC &,const char *,StringC &)
-
- void cat(const StringC &,char,StringC &)
-
- void cat(const SubStringC &,const StringC &,StringC &)
-
- void cat(const SubStringC &,const SubStringC &,StringC &)
-
- void cat(const SubStringC &,const char *,StringC &)
-
- void cat(const SubStringC &,char,StringC &)
-
- void cat(const char *,const StringC &,StringC &)
-
- void cat(const char *,const SubStringC &,StringC &)
-
- void cat(const char *,const char *,StringC &)
-
- void cat(const char *,char,StringC &)
-
double concatenation, by request. (yes, there are too many versions,
but if one is supported, then the others should be too...)
Concatenate first 3 args, store in last arg
- void cat(const StringC &,const StringC &,const StringC &,StringC &)
-
- void cat(const StringC &,const StringC &,const SubStringC &,StringC &)
-
- void cat(const StringC &,const StringC &,const char *,StringC &)
-
- void cat(const StringC &,const StringC &,char,StringC &)
-
- void cat(const StringC &,const SubStringC &,const StringC &,StringC &)
-
- void cat(const StringC &,const SubStringC &,const SubStringC &,StringC &)
-
- void cat(const StringC &,const SubStringC &,const char *,StringC &)
-
- void cat(const StringC &,const SubStringC &,char,StringC &)
-
- void cat(const StringC &,const char *,const StringC &,StringC &)
-
- void cat(const StringC &,const char *,const SubStringC &,StringC &)
-
- void cat(const StringC &,const char *,const char *,StringC &)
-
- void cat(const StringC &,const char *,char,StringC &)
-
- void cat(const char *,const StringC &,const StringC &,StringC &)
-
- void cat(const char *,const StringC &,const SubStringC &,StringC &)
-
- void cat(const char *,const StringC &,const char *,StringC &)
-
- void cat(const char *,const StringC &,char,StringC &)
-
- void cat(const char *,const SubStringC &,const StringC &,StringC &)
-
- void cat(const char *,const SubStringC &,const SubStringC &,StringC &)
-
- void cat(const char *,const SubStringC &,const char *,StringC &)
-
- void cat(const char *,const SubStringC &,char,StringC &)
-
- void cat(const char *,const char *,const StringC &,StringC &)
-
- void cat(const char *,const char *,const SubStringC &,StringC &)
-
- void cat(const char *,const char *,const char *,StringC &)
-
- void cat(const char *,const char *,char,StringC &)
-
searching & matching
return position of target in string or -1 for failure
- int index(char c,int startpos = 0) const
-
- int index(const StringC & y,int startpos = 0) const
-
- int index(const SubStringC & y,int startpos = 0) const
-
- int index(const char * t,int startpos = 0) const
-
- int index(const Regex & r,int startpos = 0) const
-
return 1 if target appears anyhere in StringC; else 0
- int contains(char c) const
-
- int contains(const StringC & y) const
-
- int contains(const SubStringC & y) const
-
- int contains(const char * t) const
-
- int contains(const Regex & r) const
-
return 1 if target appears anywhere after position pos
(or before, if pos is negative) in StringC; else 0
- int contains(char c,int pos) const
-
- int contains(const StringC & y,int pos) const
-
- int contains(const SubStringC & y,int pos) const
-
- int contains(const char * t,int pos) const
-
- int contains(const Regex & r,int pos) const
-
return 1 if target appears at position pos in StringC; else 0
- int matches(char c,int pos = 0) const
-
- int matches(const StringC & y,int pos = 0) const
-
- int matches(const SubStringC & y,int pos = 0) const
-
- int matches(const char * t,int pos = 0) const
-
- int matches(const Regex & r,int pos = 0) const
-
- int CaseCmp(const StringC & str) const
-
case-insensitive comparison of strings (c.f. strcasecmp (3))
i.e. returns 0 if =, -1 if <, +1 if >.
return number of occurences of target in StringC
- int freq(char c) const
-
- int freq(const StringC & y) const
-
- int freq(const SubStringC & y) const
-
- int freq(const char * t) const
-
SubStringC extraction
Note that you can't take a substring of a const StringC, since
this leaves open the possiblility of indirectly modifying the
StringC through the SubStringC
- SubStringC at(int pos,int len)
-
- SubStringC operator()(int pos,int len)
-
synonym for at
- SubStringC at(const StringC & x,int startpos = 0)
-
- SubStringC at(const SubStringC & x,int startpos = 0)
-
- SubStringC at(const char * t,int startpos = 0)
-
- SubStringC at(char c,int startpos = 0)
-
- SubStringC at(const Regex & r,int startpos = 0)
-
- SubStringC before(int pos)
-
- SubStringC before(const StringC & x,int startpos = 0)
-
- SubStringC before(const SubStringC & x,int startpos = 0)
-
- SubStringC before(const char * t,int startpos = 0)
-
- SubStringC before(char c,int startpos = 0)
-
- SubStringC before(const Regex & r,int startpos = 0)
-
- SubStringC through(int pos)
-
- SubStringC through(const StringC & x,int startpos = 0)
-
- SubStringC through(const SubStringC & x,int startpos = 0)
-
- SubStringC through(const char * t,int startpos = 0)
-
- SubStringC through(char c,int startpos = 0)
-
- SubStringC through(const Regex & r,int startpos = 0)
-
- SubStringC from(int pos)
-
- SubStringC from(const StringC & x,int startpos = 0)
-
- SubStringC from(const SubStringC & x,int startpos = 0)
-
- SubStringC from(const char * t,int startpos = 0)
-
- SubStringC from(char c,int startpos = 0)
-
- SubStringC from(const Regex & r,int startpos = 0)
-
- SubStringC after(int pos)
-
- SubStringC after(const StringC & x,int startpos = 0)
-
- SubStringC after(const SubStringC & x,int startpos = 0)
-
- SubStringC after(const char * t,int startpos = 0)
-
- SubStringC after(char c,int startpos = 0)
-
- SubStringC after(const Regex & r,int startpos = 0)
-
deletion
delete len chars starting at pos
- void del(int pos,int len)
-
delete the first occurrence of target after startpos
- void del(const StringC & y,int startpos = 0)
-
- void del(const SubStringC & y,int startpos = 0)
-
- void del(const char * t,int startpos = 0)
-
- void del(char c,int startpos = 0)
-
- void del(const Regex & r,int startpos = 0)
-
global substitution: substitute all occurrences of pat with repl
- int gsub(const StringC & pat,const StringC & repl)
-
- int gsub(const SubStringC & pat,const StringC & repl)
-
- int gsub(const char * pat,const StringC & repl)
-
- int gsub(const char * pat,const char * repl)
-
- int gsub(const Regex & pat,const StringC & repl)
-
friends & utilities
split string into array res at separators; return number of elements
- int split(const StringC & x,StringC res[],int maxn,const StringC & sep)
-
- int split(const StringC & x,StringC res[],int maxn,const Regex & sep)
-
- StringC common_prefix(const StringC & x,const StringC & y,int startpos = 0)
-
- StringC common_suffix(const StringC & x,const StringC & y,int startpos = -1)
-
- StringC StrCreplicate(char c,int n)
-
- StringC StrCreplicate(const StringC & y,int n)
-
- StringC StrCreplicateStrC(const StringC & y,int n)
-
- StringC join(StringC src[],int n,const StringC & sep)
-
simple builtin transformations
- StringC reverse(const StringC & x)
-
- StringC upcase(const StringC & x)
-
- StringC downcase(const StringC & x)
-
- StringC capitalize(const StringC & x)
-
in-place versions of above
- void reverse()
-
Reverse order of charactors in string.
- void upcase()
-
Convert all charactors to upper case.
- void downcase()
-
Convert all charactors to lower case.
- void capitalize()
-
Convert all charactors to upper case ?
element extraction
- char & operator[](MUIndexT i)
-
- const char & operator[](MUIndexT i) const
-
- char & operator[](IndexT i)
-
- const char & operator[](IndexT i) const
-
- char & operator[](int i)
-
- const char & operator[](int i) const
-
- char elem(int i) const
-
- char firstchar() const
-
- char lastchar() const
-
conversion
- operator const char *() const
-
- const char * chars() const
-
Convert to old char* strings.
IO
- ostream & operator<<(ostream & s,const StringC & x)
-
- ostream & operator<<(ostream & s,const SubStringC & x)
-
- istream & operator>>(istream & s,StringC & x)
-
- BinIStreamC & operator>>(BinIStreamC & s,StringC & x)
-
- int readline(istream & s,StringC & x,char terminator = '\n',int discard_terminator = 1)
-
status
- unsigned int length() const
-
Get length of string.
- int empty() const
-
Test if string is empty.
- int IsEmpty() const
-
More AMMA like test.
- void alloc(int newsize)
-
preallocate some space for StringC
- int allocation() const
-
report current allocation (not length!)
Amma compatability...
- SizeT Size() const
-
Get size of string.
inline operator char *();
Convert to plain 'C' style string.
- void error(const char * msg)
-
Print error message.
- int OK() const
-
Check it valid.
- StringC TopAndTail() const
-
Remove while space from begining and end of string.
|
Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|