DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
// Boost string_algo library find.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_FIND_HPP #define BOOST_STRING_FIND_HPP #include
#include
#include
#include
#include
#include
#include
#include
#include
/*! \file Defines a set of find algorithms. The algorithms are searching for a substring of the input. The result is given as an \c iterator_range delimiting the substring. */ namespace boost { namespace algorithm { // Generic find -----------------------------------------------// //! Generic find algorithm /*! Search the input using the given finder. \param Input A string which will be searched. \param Finder Finder object used for searching. \return An \c iterator_range delimiting the match. Returned iterator is either \c RangeT::iterator or \c RangeT::const_iterator, depending on the constness of the input parameter. */ template
inline iterator_range< BOOST_STRING_TYPENAME range_iterator
::type> find( RangeT& Input, const FinderT& Finder) { iterator_range
::type> lit_input(as_literal(Input)); return Finder(begin(lit_input),end(lit_input)); } // find_first -----------------------------------------------// //! Find first algorithm /*! Search for the first occurrence of the substring in the input. \param Input A string which will be searched. \param Search A substring to be searched for. \return An \c iterator_range delimiting the match. Returned iterator is either \c RangeT::iterator or \c RangeT::const_iterator, depending on the constness of the input parameter. \note This function provides the strong exception-safety guarantee */ template
inline iterator_range< BOOST_STRING_TYPENAME range_iterator
::type> find_first( Range1T& Input, const Range2T& Search) { return find(Input, first_finder(Search)); } //! Find first algorithm ( case insensitive ) /*! Search for the first occurence of the substring in the input. Searching is case insensitive. \param Input A string which will be searched. \param Search A substring to be searched for. \param Loc A locale used for case insensitive comparison \return An \c iterator_range delimiting the match. Returned iterator is either \c Range1T::iterator or \c Range1T::const_iterator, depending on the constness of the input parameter. \note This function provides the strong exception-safety guarantee */ template
inline iterator_range< BOOST_STRING_TYPENAME range_iterator
::type> ifind_first( Range1T& Input, const Range2T& Search, const std::locale& Loc=std::locale()) { return find(Input, first_finder(Search,is_iequal(Loc))); } // find_last -----------------------------------------------// //! Find last algorithm /*! Search for the last occurrence of the substring in the input. \param Input A string which will be searched. \param Search A substring to be searched for. \return An \c iterator_range delimiting the match. Returned iterator is either \c Range1T::iterator or \c Range1T::const_iterator, depending on the constness of the input parameter. \note This function provides the strong exception-safety guarantee */ template
inline iterator_range< BOOST_STRING_TYPENAME range_iterator
::type> find_last( Range1T& Input, const Range2T& Search) { return find(Input, last_finder(Search)); } //! Find last algorithm ( case insensitive ) /*! Search for the last match a string in the input. Searching is case insensitive. \param Input A string which will be searched. \param Search A substring to be searched for. \param Loc A locale used for case insensitive comparison \return An \c iterator_range delimiting the match. Returned iterator is either \c Range1T::iterator or \c Range1T::const_iterator, depending on the constness of the input parameter. \note This function provides the strong exception-safety guarantee */ template
inline iterator_range< BOOST_STRING_TYPENAME range_iterator
::type> ifind_last( Range1T& Input, const Range2T& Search, const std::locale& Loc=std::locale()) { return find(Input, last_finder(Search, is_iequal(Loc))); } // find_nth ----------------------------------------------------------------------// //! Find n-th algorithm /*! Search for the n-th (zero-indexed) occurrence of the substring in the input. \param Input A string which will be searched. \param Search A substring to be searched for. \param Nth An index (zero-indexed) of the match to be found. For negative N, the matches are counted from the end of string. \return An \c iterator_range delimiting the match. Returned iterator is either \c Range1T::iterator or \c Range1T::const_iterator, depending on the constness of the input parameter. */ template
inline iterator_range< BOOST_STRING_TYPENAME range_iterator
::type> find_nth( Range1T& Input, const Range2T& Search, int Nth) { return find(Input, nth_finder(Search,Nth)); } //! Find n-th algorithm ( case insensitive ). /*! Search for the n-th (zero-indexed) occurrence of the substring in the input. Searching is case insensitive. \param Input A string which will be searched. \param Search A substring to be searched for. \param Nth An index (zero-indexed) of the match to be found. For negative N, the matches are counted from the end of string. \param Loc A locale used for case insensitive comparison \return An \c iterator_range delimiting the match. Returned iterator is either \c Range1T::iterator or \c Range1T::const_iterator, depending on the constness of the input parameter. \note This function provides the strong exception-safety guarantee */ template
inline iterator_range< BOOST_STRING_TYPENAME range_iterator
::type> ifind_nth( Range1T& Input, const Range2T& Search, int Nth, const std::locale& Loc=std::locale()) { return find(Input, nth_finder(Search,Nth,is_iequal(Loc))); } // find_head ----------------------------------------------------------------------// //! Find head algorithm /*! Get the head of the input. Head is a prefix of the string of the given size. If the input is shorter then required, whole input if considered to be the head. \param Input An input string \param N Length of the head For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted. \return An \c iterator_range delimiting the match. Returned iterator is either \c Range1T::iterator or \c Range1T::const_iterator, depending on the constness of the input parameter. \note This function provides the strong exception-safety guarantee */ template
inline iterator_range< BOOST_STRING_TYPENAME range_iterator
::type> find_head( RangeT& Input, int N) { return find(Input, head_finder(N)); } // find_tail ----------------------------------------------------------------------// //! Find tail algorithm /*! Get the head of the input. Head is a suffix of the string of the given size. If the input is shorter then required, whole input if considered to be the tail. \param Input An input string \param N Length of the tail. For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted. \return An \c iterator_range delimiting the match. Returned iterator is either \c RangeT::iterator or \c RangeT::const_iterator, depending on the constness of the input parameter. \note This function provides the strong exception-safety guarantee */ template
inline iterator_range< BOOST_STRING_TYPENAME range_iterator
::type> find_tail( RangeT& Input, int N) { return find(Input, tail_finder(N)); } // find_token --------------------------------------------------------------------// //! Find token algorithm /*! Look for a given token in the string. Token is a character that matches the given predicate. If the "token compress mode" is enabled, adjacent tokens are considered to be one match. \param Input A input string. \param Pred An unary predicate to identify a token \param eCompress Enable/Disable compressing of adjacent tokens \return An \c iterator_range delimiting the match. Returned iterator is either \c RangeT::iterator or \c RangeT::const_iterator, depending on the constness of the input parameter. \note This function provides the strong exception-safety guarantee */ template
inline iterator_range< BOOST_STRING_TYPENAME range_iterator
::type> find_token( RangeT& Input, PredicateT Pred, token_compress_mode_type eCompress=token_compress_off) { return find(Input, token_finder(Pred, eCompress)); } } // namespace algorithm // pull names to the boost namespace using algorithm::find; using algorithm::find_first; using algorithm::ifind_first; using algorithm::find_last; using algorithm::ifind_last; using algorithm::find_nth; using algorithm::ifind_nth; using algorithm::find_head; using algorithm::find_tail; using algorithm::find_token; } // namespace boost #endif // BOOST_STRING_FIND_HPP
find.hpp
Page URL
File URL
Prev
8/24
Next
Download
( 12 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.