Sha256: 3b054ceb247607d682d9fb550a6c023607072155992cbe0a58fb6e6063b39e11

Contents?: true

Size: 619 Bytes

Versions: 161

Compression:

Stored size: 619 Bytes

Contents

#ifndef UNF_UTIL_HH
#define UNF_UTIL_HH

namespace UNF {
  namespace Util {
    inline bool is_utf8_char_start_byte(char byte) {
      if(!(byte&0x80))    return true; // ascii
      else if (byte&0x40) return true; // start of a UTF-8 character byte sequence
      return false;
    }

    inline const char* nearest_utf8_char_start_point(const char* s) {
      for(; is_utf8_char_start_byte(*s)==false; s++);
      return s;
    }

    template <class CharStream>
    inline void eat_until_utf8_char_start_point(CharStream& in) {
      for(; is_utf8_char_start_byte(in.peek())==false; in.read());
    }
  }
}

#endif

Version data entries

161 entries across 131 versions & 15 rubygems

Version Path
paynow_sdk-1.0.8 vendor/bundle/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.4 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.4 vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.3 vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.3 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.2 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.2 vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.1 vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.1 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh
paynow_sdk-1.0.0 vendor/cache/ruby/2.7.0/gems/unf_ext-0.0.7.7/ext/unf_ext/unf/util.hh