38 lines
726 B
C
Raw Normal View History

2021-12-03 15:28:47 +01:00
#pragma once
//
// FILE: palindrome.h
// AUTHOR: Rob Tillaart
2023-11-14 17:12:20 +01:00
// VERSION: 0.1.3
2021-12-03 15:28:47 +01:00
// PURPOSE: Arduino library to do palindrome experiments.
// URL: https://github.com/RobTillaart/palindrome
//
#include "Arduino.h"
2023-11-14 17:12:20 +01:00
#define PALINDROME_LIB_VERSION (F("0.1.3"))
2021-12-03 15:28:47 +01:00
class palindrome
{
public:
palindrome();
bool isPalindrome(const char * str);
int findPalindrome(const char * str, int & position, int & length);
int findEvenPalindrome(const char * str, int & position, int & length);
int findOddPalindrome(const char * str, int & position, int & length);
int palindromeCount(const char * str);
float palindromePercentage(const char * str);
private:
};
2023-11-14 17:12:20 +01:00
// -- END OF FILE --
2021-12-03 15:28:47 +01:00