1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2025-05-18 12:02:53 +02:00

feat(solutions): add caesar-cipher/c/function

This commit is contained in:
Divlo
2021-10-07 14:51:19 +02:00
parent 3b153a9f1f
commit 108642e57f
8 changed files with 138 additions and 0 deletions

View File

@ -0,0 +1,23 @@
#ifndef STRING_H
#define STRING_H
#define ALPHABET "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
/**
* @brief Shift the alphabet by a given amount.
*
* @param shift
* @return char*
*/
char* string_shift_alphabet(int shift);
/**
* @brief Encrypts a string using the Caesar cipher.
*
* @param string
* @param shift
* @return char*
*/
char* string_caesar_cipher(char* string, int shift);
#endif