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
/* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to 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) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: primary_transform.hpp * VERSION: see
* DESCRIPTION: Heuristically determines the sort string format in use * by the current locale. */ #ifndef BOOST_REGEX_PRIMARY_TRANSFORM #define BOOST_REGEX_PRIMARY_TRANSFORM #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ namespace re_detail{ enum{ sort_C, sort_fixed, sort_delim, sort_unknown }; template
unsigned count_chars(const S& s, charT c) { // // Count how many occurances of character c occur // in string s: if c is a delimeter between collation // fields, then this should be the same value for all // sort keys: // unsigned int count = 0; for(unsigned pos = 0; pos < s.size(); ++pos) { if(s[pos] == c) ++count; } return count; } template
unsigned find_sort_syntax(const traits* pt, charT* delim) { // // compare 'a' with 'A' to see how similar they are, // should really use a-accute but we can't portably do that, // typedef typename traits::string_type string_type; typedef typename traits::char_type char_type; // Suppress incorrect warning for MSVC (void)pt; char_type a[2] = {'a', '\0', }; string_type sa(pt->transform(a, a+1)); if(sa == a) { *delim = 0; return sort_C; } char_type A[2] = { 'A', '\0', }; string_type sA(pt->transform(A, A+1)); char_type c[2] = { ';', '\0', }; string_type sc(pt->transform(c, c+1)); int pos = 0; while((pos <= static_cast
(sa.size())) && (pos <= static_cast
(sA.size())) && (sa[pos] == sA[pos])) ++pos; --pos; if(pos < 0) { *delim = 0; return sort_unknown; } // // at this point sa[pos] is either the end of a fixed width field // or the character that acts as a delimiter: // charT maybe_delim = sa[pos]; if((pos != 0) && (count_chars(sa, maybe_delim) == count_chars(sA, maybe_delim)) && (count_chars(sa, maybe_delim) == count_chars(sc, maybe_delim))) { *delim = maybe_delim; return sort_delim; } // // OK doen't look like a delimiter, try for fixed width field: // if((sa.size() == sA.size()) && (sa.size() == sc.size())) { // note assumes that the fixed width field is less than // (numeric_limits
::max)(), should be true for all types // I can't imagine 127 character fields... *delim = static_cast
(++pos); return sort_fixed; } // // don't know what it is: // *delim = 0; return sort_unknown; } } // namespace re_detail } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif
primary_transform.hpp
Page URL
File URL
Prev
20/43
Next
Download
( 3 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.