| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
I'm a developer... I know web development and app development.
Javascript, HTML, CSS, C++,Java...
This header file has a functions which are only use in java and javascript.
In this functions we should pass the string as first parameter.
how to include this header file
#include "stringFunctions.h"trim function
int main(){
string sample = " This created by prabeen ";
cout << trim(sample);
}
trimStart function
int main(){
string sample = " This created by prabeen ";
cout << trimStart(sample);
}trimEnd function
int main(){
string sample = " This created by prabeen ";
cout << trimEnd(sample);
}capitalize function
int main(){
string sample = " This created by prabeen ";
cout << capitalize(sample);
}toLowerCase function
int main(){
string sample = " This created by prabeen ";
cout << toLowerCase(sample);
}toUpperCase function
int main(){
string sample = " This created by prabeen ";
cout << toUpperCase(sample);
}substr function
int main(){
string sample = " This created by prabeen ";
//cout << substr(sample,start_index,end_index);
cout << substr(sample,3,6);
}substring function
int main(){
string sample = " This created by prabeen ";
//cout << substring(sample,start_index,end_index);
cout << substring(sample,3,6);
}slice function
int main(){
string sample = " This created by prabeen ";
//cout << slice(sample,start_index,end_index);
cout << slice(sample,3,6);
}charAt function
int main(){
string sample = " This created by prabeen ";
//cout << charAt(sample,position);
cout << charAt(sample,7);
}indexOf function
int main(){
string sample = " This created by prabeen ";
//cout << indexOf(sample,'char');
cout << substr(sample,'c';
}isStartsWith function
int main(){
string sample = " This created by prabeen ";
//cout << isStartsWith(sample,"t";
cout << isStartsWith(sample,3,6);
//this function return value in bool format
}isEndsWith function
int main(){
string sample = " This created by prabeen ";
//cout << isEndsWith(sample,"t";
cout << isEndsWith(sample,3,6);
//this function return value in bool format
}| Back | FazBrowse Home | New Git URL |