v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
string-case.h
Go to the documentation of this file.
1// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_STRINGS_STRING_CASE_H_
6#define V8_STRINGS_STRING_CASE_H_
7
8#include <cinttypes>
9
10namespace v8 {
11namespace internal {
12
13// Computes the prefix length of src that's ascii and matches the case.
14template <class CaseMapping>
15uint32_t FastAsciiCasePrefixLength(const char* src, uint32_t length);
16
17// Converts ascii chars from src to dst to the expected case in a latin1 string.
18// In case non-ascii chars appears it may bail out early. Returns the length of
19// the already processed ascii prefix.
20template <class CaseMapping>
21uint32_t FastAsciiConvert(char* dst, const char* src, uint32_t length);
22
23} // namespace internal
24} // namespace v8
25
26#endif // V8_STRINGS_STRING_CASE_H_
uint32_t FastAsciiConvert(char *dst, const char *src, uint32_t length)
uint32_t FastAsciiCasePrefixLength(const char *src, uint32_t length)