EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Defines | Functions | Variables

StdLib/LibC/Wchar/Searching.c File Reference

#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <LibConfig.h>
#include <wchar.h>

Go to the source code of this file.

Defines

#define WHICH8(c)   ((unsigned short)(c) >> 3)
#define WHICH_BIT(c)   (BitMask[((c) & 0x7)])
#define BITMAP64   ((UINT64 *)bitmap)

Functions

wchar_twcschr (const wchar_t *s, wchar_t c)
size_t wcscspn (const wchar_t *s1, const wchar_t *s2)
wchar_twcspbrk (const wchar_t *s1, const wchar_t *s2)
wchar_twcsrchr (const wchar_t *s, wchar_t c)
size_t wcsspn (const wchar_t *s1, const wchar_t *s2)
wchar_twcsstr (const wchar_t *s1, const wchar_t *s2)
wchar_twcstok (wchar_t *__restrict s1, const wchar_t *__restrict s2, wchar_t **__restrict ptr)
wchar_twmemchr (const wchar_t *s, wchar_t c, size_t n)

Variables

UINT8__wchar_bitmap
UINTN __wchar_bitmap_size
UINTN __wchar_bitmap_64

Detailed Description

Search Functions for <wchar.h>.

Unless explicitly stated otherwise, the functions defined in this file order two wide characters the same way as two integers of the underlying integer type designated by wchar_t.

Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file Searching.c.


Define Documentation

#define BITMAP64   ((UINT64 *)bitmap)

Definition at line 55 of file Searching.c.

#define WHICH8 (   c)    ((unsigned short)(c) >> 3)

Definition at line 53 of file Searching.c.

#define WHICH_BIT (   c)    (BitMask[((c) & 0x7)])

Definition at line 54 of file Searching.c.


Function Documentation

wchar_t* wcschr ( const wchar_t s,
wchar_t  c 
)

The wcschr function locates the first occurrence of c in the wide string pointed to by s. The terminating null wide character is considered to be part of the wide string.

Returns:
The wcschr function returns a pointer to the located wide character, or a null pointer if the wide character does not occur in the wide string.

Definition at line 39 of file Searching.c.

size_t wcscspn ( const wchar_t s1,
const wchar_t s2 
)

The wcscspn function computes the length of the maximum initial segment of the wide string pointed to by s1 which consists entirely of wide characters not from the wide string pointed to by s2.

Returns:
The wcscspn function returns the length of the segment.

Definition at line 84 of file Searching.c.

wchar_t* wcspbrk ( const wchar_t s1,
const wchar_t s2 
)

The wcspbrk function locates the first occurrence in the wide string pointed to by s1 of any wide character from the wide string pointed to by s2.

Returns:
The wcspbrk function returns a pointer to the wide character in s1, or a null pointer if no wide character from s2 occurs in s1.

Definition at line 113 of file Searching.c.

wchar_t* wcsrchr ( const wchar_t s,
wchar_t  c 
)

The wcsrchr function locates the last occurrence of c in the wide string pointed to by s. The terminating null wide character is considered to be part of the wide string.

Returns:
The wcsrchr function returns a pointer to the wide character, or a null pointer if c does not occur in the wide string.

Definition at line 137 of file Searching.c.

size_t wcsspn ( const wchar_t s1,
const wchar_t s2 
)

The wcsspn function computes the length of the maximum initial segment of the wide string pointed to by s1 which consists entirely of wide characters from the wide string pointed to by s2.

Returns:
The wcsspn function returns the length of the segment.

Definition at line 154 of file Searching.c.

wchar_t* wcsstr ( const wchar_t s1,
const wchar_t s2 
)

The wcsstr function locates the first occurrence in the wide string pointed to by s1 of the sequence of wide characters (excluding the terminating null wide character) in the wide string pointed to by s2.

Returns:
The wcsstr function returns a pointer to the located wide string, or a null pointer if the wide string is not found. If s2 points to a wide string with zero length, the function returns s1.

Definition at line 179 of file Searching.c.

wchar_t* wcstok ( wchar_t *__restrict  s1,
const wchar_t *__restrict  s2,
wchar_t **__restrict  ptr 
)

A sequence of calls to the wcstok function breaks the wide string pointed to by s1 into a sequence of tokens, each of which is delimited by a wide character from the wide string pointed to by s2. The third argument points to a caller-provided wchar_t pointer into which the wcstok function stores information necessary for it to continue scanning the same wide string.

The first call in a sequence has a non-null first argument and stores an initial value in the object pointed to by ptr. Subsequent calls in the sequence have a null first argument and the object pointed to by ptr is required to have the value stored by the previous call in the sequence, which is then updated. The separator wide string pointed to by s2 may be different from call to call.

The first call in the sequence searches the wide string pointed to by s1 for the first wide character that is not contained in the current separator wide string pointed to by s2. If no such wide character is found, then there are no tokens in the wide string pointed to by s1 and the wcstok function returns a null pointer. If such a wide character is found, it is the start of the first token.

The wcstok function then searches from there for a wide character that is contained in the current separator wide string. If no such wide character is found, the current token extends to the end of the wide string pointed to by s1, and subsequent searches in the same wide string for a token return a null pointer. If such a wide character is found, it is overwritten by a null wide character, which terminates the current token.

In all cases, the wcstok function stores sufficient information in the pointer pointed to by ptr so that subsequent calls, with a null pointer for s1 and the unmodified pointer value for ptr, shall start searching just past the element overwritten by a null wide character (if any).

Returns:
The wcstok function returns a pointer to the first wide character of a token, or a null pointer if there is no token.

Definition at line 219 of file Searching.c.

wchar_t* wmemchr ( const wchar_t s,
wchar_t  c,
size_t  n 
)

The wmemchr function locates the first occurrence of c in the initial n wide characters of the object pointed to by s.

Returns:
The wmemchr function returns a pointer to the located wide character, or a null pointer if the wide character does not occur in the object.

Definition at line 267 of file Searching.c.


Variable Documentation

Definition at line 26 of file ConsDecons.c.

Definition at line 28 of file ConsDecons.c.

Definition at line 27 of file ConsDecons.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines