FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: strstr function is missing in string.h Is this correct?  (Read 578 times)

xenon68

  • Newbie
  • *
  • Posts: 7
    • View Profile
strstr function is missing in string.h Is this correct?
« 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?
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 800
    • View Profile
Re: strstr function is missing in string.h Is this correct?
« Reply #1 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

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#

Best Regards

FTDI Community
Logged

xenon68

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: strstr function is missing in string.h Is this correct?
« Reply #2 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
*/
Logged

xenon68

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: strstr function is missing in string.h Is this correct?
« Reply #3 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.
Logged