Example of function call:
lr_save_string(“chaitanya m bhatt”, “InputName”);
lr_searchReplace(lr_eval_string(“{InputName}”), “OutputProjName”, ‘ ‘, ‘+’);

Note: Space – ‘ ‘ is the input character or lookup character and ‘+’ is the character which will be replaced in the place of the lookup character.

Note that the input string is = “chaitanya m bhatt” . In this name the lookup character is space – ‘ ‘.
The expected output string is = “chaitanya+m+bhatt” since the variable repChar is set to ‘+’.


void lr_searchReplace(char* inputStr, char* outputStr, char lookupChar, char repChar)
	{

    		char *ptr =inputStr;
		char xchar;
		int len=0;
		int i=0;

		lr_output_message("%s",inputStr);
		xchar = *ptr;//Copy initial
		len=strlen(inputStr);
		while (len>0)
		{

			len--;
			xchar = *ptr;
			if(xchar==lookupChar)
			{
				inputStr[i]= repChar;

			}

			ptr++;
			i++;

		}

	  lr_save_string(inputStr,outputStr);
               lr_output_message("%s",inputStr);

	}