First Upload

This commit is contained in:
2022-02-25 15:33:16 +02:00
commit 0c74d10f0d
295 changed files with 74784 additions and 0 deletions

35
9/ex1.c Normal file
View File

@@ -0,0 +1,35 @@
#include "IdanStringLib.h"
#include "IdanLib.h"
#include <stdio.h>
#define STRING_MAX_SIZE 256
//---------------------------------------------------------------------------------------
// Exercise 1
// ----------
//
// General : The program deletes a string in a string till the are no more.
//
// Input : 2 string.
//
// Process : The program checks if the is the string that needs too be deleted if there
// is delete else stop and print how many times it was deleted and the new
// string.
//
// Output : The new string and how many times it deleted.
//
//---------------------------------------------------------------------------------------
// Programmer : Cohen Idan
// Student No : 211675038
// Date : 04.11.2019
//---------------------------------------------------------------------------------------
void main(void)
{
typedef char string[STRING_MAX_SIZE];
string str1 = "";
string str2 = "";
printf("Count: %u\n", CountStringBInStringA(str1, str2));
RemoveAllStringBFromStringA(str1, str2);
printf("The text: %s\n", str1);
}