The string function is strlength and it is evoked to return the length of a string.
GetA is a math function and not a string function.
Without any function is impossible. So I'll assume you mean any coded function, in which case the predefined function below is your answer.$string = strrev($string);
The string function that appends a source string to a destination string is typically called strcat in C and C++. This function takes two arguments: the destination string and the source string, and it appends the source string to the end of the destination string, modifying the destination string in place. In other programming languages, similar functionality may be achieved with functions like concat or the + operator for string concatenation.
string length is a function use to check the lenght of a string i.e number of alphabets in a word or sentence.
shashi
between parentheses: funname ("string")
These should work, if used correctly. // stores srcL + srcR into dest // NOTE: dest must be at least as large as srcL + srcR void strConcat(const char* srcL, const char* srcR, char* dest) { const int lengthL = strLength(srcL); const int lengthR = strLength(srcR); // copy srcL into front of dest int i; for(i = 0; i < lengthL; ++i) { dest[i] = srcL[i]; } // copy srcR into the rest of dest for(i = 0; i < lengthR; ++i) { dest[lengthL + i] = srcR[i]; } dest[lengthL + i] = '\0'; } // copies characters from src to dest // NOTE: dest must be at least as large as src void strCopy(const char* src, char* dest) { const int length = strLength(src); // copy int i; for(i = 0; i < length; ++i) { dest[i] = src[i]; } } // reverses str and puts the result in buff // NOTE: buff must be at least as large as str void strReverse(const char* str, char* buff) { const int length = strLength(str); // special case for zero-length strings if( length == 0 ) { return; } // reversify int i; for(i = 0; i < length; ++i) { buff[i] = str[length - i - 1]; } buff[i] = '\0'; } // returns the number of characters in str int strLength(const char* str) { int length = 0; // take advantage of the fact that all strings MUST end in a null character while( str[length] != '\0' ) { ++length; } return length; }
The REPLACE function.
Use "+". Example: String string = "does this answer " + "your question?";
You can't. If you want to find the length of a String object, you must use at least one of the String methods. Simply iterate over your char* and count the number of characters you find before you reach the null character . int strLength(const char* str) { int length = 0; // take advantage of the fact that all strings MUST end in a null character while( str[length] != '\0' ) { ++length; } return length; }
Hay buddy this is homework. U have to solve it by urself.
strlen