Sha256: 5afa23d85cf35ec5bf92d7df14848314fed86da2ccd63fd46e4db5db5963ca04

Contents?: true

Size: 1.88 KB

Versions: 135

Compression:

Stored size: 1.88 KB

Contents

/*
 * Copyright (c) 1999
 * Silicon Graphics Computer Systems, Inc.
 *
 * Copyright (c) 1999
 * Boris Fomitchev
 *
 * This material is provided "as is", with absolutely no warranty expressed
 * or implied. Any use is at your own risk.
 *
 * Permission to use or copy this software for any purpose is hereby granted
 * without fee, provided the above notices are retained on all copies.
 * Permission to modify the code and to distribute modified code is granted,
 * provided the above notices are retained, and a notice that the code was
 * modified is included with the above copyright notice.
 *
 */
#include "stlport_prefix.h"

#include <locale>

_STLP_BEGIN_NAMESPACE

// collate<char>

collate<char>::~collate() {}

int collate<char>::do_compare(const char* low1, const char* high1,
                              const char* low2, const char* high2) const
{ return _STLP_PRIV __lexicographical_compare_3way(low1, high1, low2, high2); }

string collate<char>::do_transform(const char* low, const char* high) const
{ return string(low, high); }

long collate<char>::do_hash(const char* low, const char* high) const {
  unsigned long result = 0;
  for ( ; low < high; ++low)
    result = 5 * result + *low;
  return result;
}

#if !defined (_STLP_NO_WCHAR_T)
// collate<wchar_t>

collate<wchar_t>::~collate() {}

int
collate<wchar_t>::do_compare(const wchar_t* low1, const wchar_t* high1,
                             const wchar_t* low2, const wchar_t* high2) const
{ return _STLP_PRIV __lexicographical_compare_3way(low1, high1, low2, high2); }

wstring collate<wchar_t>::do_transform(const wchar_t* low, const wchar_t* high) const
{ return wstring(low, high); }

long collate<wchar_t>::do_hash(const wchar_t* low, const wchar_t* high) const {
  unsigned long result = 0;
  for ( ; low < high; ++low)
    result = 5 * result + *low;
  return result;
}
#endif

_STLP_END_NAMESPACE


// Local Variables:
// mode:C++
// End:

Version data entries

135 entries across 135 versions & 2 rubygems

Version Path
rhodes-7.6.0 platform/shared/stlport/src/collate.cpp
rhodes-7.5.1 platform/shared/stlport/src/collate.cpp
rhodes-7.4.1 platform/shared/stlport/src/collate.cpp
rhodes-7.1.17 platform/shared/stlport/src/collate.cpp
rhodes-6.2.0 platform/shared/stlport/src/collate.cpp
rhodes-6.0.11 platform/shared/stlport/src/collate.cpp
rhodes-5.5.18 platform/shared/stlport/src/collate.cpp
rhodes-5.5.17 platform/shared/stlport/src/collate.cpp
rhodes-5.5.15 platform/shared/stlport/src/collate.cpp
rhodes-5.5.0.22 platform/shared/stlport/src/collate.cpp
rhodes-5.5.2 platform/shared/stlport/src/collate.cpp
rhodes-5.5.0.7 platform/shared/stlport/src/collate.cpp
rhodes-5.5.0.3 platform/shared/stlport/src/collate.cpp
rhodes-5.5.0 platform/shared/stlport/src/collate.cpp
tauplatform-1.0.3 platform/shared/stlport/src/collate.cpp
tauplatform-1.0.2 platform/shared/stlport/src/collate.cpp
tauplatform-1.0.1 platform/shared/stlport/src/collate.cpp
rhodes-3.5.1.12 platform/shared/stlport/src/collate.cpp
rhodes-3.3.5 platform/shared/stlport/src/collate.cpp
rhodes-3.4.2 platform/shared/stlport/src/collate.cpp