FTDI Community

General Category => Discussion - Software => Topic started by: xenon68 on June 13, 2022, 11:27:34 PM

Title: strstr function is missing in string.h Is this correct?
Post by: xenon68 on June 13, 2022, 11:27:34 PM
I can't seem to find the standard function strstr

char *strstr(const char *haystack, const char *needle)

is this not a part of the FTDI string.h library?
Title: Re: strstr function is missing in string.h Is this correct?
Post by: FTDI Community on June 14, 2022, 03:05:56 PM
Hi xenon68,

sting.h is not FTDI code. it is a standard C language header file that you can include in your project. https://www.tutorialspoint.com/c_standard_library/string_h.htm (http://url)

You can find information about the strstr function online, this link can help you https://www.tutorialspoint.com/c_standard_library/c_function_strstr.htm# (http://url)

Best Regards

FTDI Community
Title: Re: strstr function is missing in string.h Is this correct?
Post by: xenon68 on June 17, 2022, 12:47:45 AM
FTDI puts a copyright notice in their string.h, so they must feel some attachment to the code (see below from the FTDI string.h source)

/*
** string.h
**
** Copyright (C) 2009 Future Technolgy Devices International Limited
**
** Project: Tool Chain
** Module: VII Library
** Requires:
** Comments:
**
** History:
**  1  initial version
*/
Title: Re: strstr function is missing in string.h Is this correct?
Post by: xenon68 on June 21, 2022, 02:50:22 AM
I am going to assume the Vinculum IDE string.a has all the other functions. So just adding the missing functions to the Vinculum's string.h will work. So far the compiler has not errored with the changes. I will have to see once I complete porting my code from the eclipse IDE.