3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync/* $Id$ */
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync/** @file
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * IPRT - RTStrStr.
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync */
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync/*
c58f1213e628a545081c70e26c6b67a841cff880vboxsync * Copyright (C) 2006-2010 Oracle Corporation
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync *
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * available from http://www.virtualbox.org. This file is free software;
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * you can redistribute it and/or modify it under the terms of the GNU
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * General Public License (GPL) as published by the Free Software
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync *
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * The contents of this file may alternatively be used under the terms
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * of the Common Development and Distribution License Version 1.0
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * VirtualBox OSE distribution, in which case the provisions of the
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * CDDL are applicable instead of those of the GPL.
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync *
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * You may elect to license modified versions of this file under the
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync * terms and conditions of either the GPL or the CDDL or both.
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync */
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync/*******************************************************************************
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync* Header Files *
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync*******************************************************************************/
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync#include <iprt/string.h>
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync#include "internal/iprt.h"
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsyncRTDECL(char *) RTStrStr(const char *pszHaystack, const char *pszNeedle)
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync{
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync /* Any NULL strings means NULL return. (In the RTStrCmp tradition.) */
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync if (!pszHaystack)
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync return NULL;
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync if (!pszNeedle)
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync return NULL;
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync /* The rest is CRT. */
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync return (char *)strstr(pszHaystack, pszNeedle);
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync}
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsyncRT_EXPORT_SYMBOL(RTStrStr);
3183efc91c7b8252f1dc50dca3efd2d8ae627813vboxsync