VirtualBox

Changeset 81926 in vbox for trunk/include


Ignore:
Timestamp:
Nov 18, 2019 12:30:01 AM (5 years ago)
Author:
vboxsync
Message:

IPRT: Added 32-bit memchr variant. Prepared 16 and 64 bit ones too.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/mangling.h

    r81137 r81926  
    21192119# define RTStrIsUpperCased                              RT_MANGLER(RTStrIsUpperCased)
    21202120# define RTStrIsValidEncoding                           RT_MANGLER(RTStrIsValidEncoding)
     2121# define RTStrMemFind16                                 RT_MANGLER(RTStrMemFind16)
     2122# define RTStrMemFind32                                 RT_MANGLER(RTStrMemFind32)
     2123# define RTStrMemFind64                                 RT_MANGLER(RTStrMemFind64)
    21212124# define RTStrmClearError                               RT_MANGLER(RTStrmClearError)
    21222125# define RTStrmClose                                    RT_MANGLER(RTStrmClose)
  • trunk/include/iprt/string.h

    r80764 r81926  
    33963396/** @}  */
    33973397
     3398
     3399/** @defgroup rt_str_mem       Raw memory operations.
     3400 *
     3401 * @note Following the memchr/memcpy/memcmp/memset tradition and putting these
     3402 *       in the string.h header rather than in the mem.h one.
     3403 *
     3404 * @{ */
     3405
     3406/**
     3407 * Searches @a pvHaystack for a 16-bit sized and aligned @a uNeedle.
     3408 *
     3409 * @returns Pointer to the first hit if found, NULL if not found.
     3410 * @param   pvHaystack      The memory to search.
     3411 * @param   uNeedle         The 16-bit value to find.
     3412 * @param   cbHaystack      Size of the memory to search.
     3413 * @sa      memchr, RTStrMemFind32, RTStrMemFind64
     3414 */
     3415RTDECL(uint16_t *) RTStrMemFind16(const void *pvHaystack, uint16_t uNeedle, size_t cbHaystack);
     3416
     3417/**
     3418 * Searches @a pvHaystack for a 32-bit sized and aligned @a uNeedle.
     3419 *
     3420 * @returns Pointer to the first hit if found, NULL if not found.
     3421 * @param   pvHaystack      The memory to search.
     3422 * @param   uNeedle         The 32-bit value to find.
     3423 * @param   cbHaystack      Size of the memory to search.
     3424 * @sa      memchr, RTStrMemFind16, RTStrMemFind64
     3425 */
     3426RTDECL(uint32_t *) RTStrMemFind32(const void *pvHaystack, uint32_t uNeedle, size_t cbHaystack);
     3427
     3428/**
     3429 * Searches @a pvHaystack for a 64-bit sized and aligned @a uNeedle.
     3430 *
     3431 * @returns Pointer to the first hit if found, NULL if not found.
     3432 * @param   pvHaystack      The memory to search.
     3433 * @param   uNeedle         The 64-bit value to find.
     3434 * @param   cbHaystack      Size of the memory to search.
     3435 * @sa      memchr, RTStrMemFind16, RTStrMemFind32
     3436 */
     3437RTDECL(uint64_t *) RTStrMemFind64(const void *pvHaystack, uint64_t uNeedle, size_t cbHaystack);
     3438
     3439/** @}  */
     3440
     3441
    33983442/** @} */
    33993443
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette