GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - prabeenragupathi/stringFunctions: This header file has a functions which are using in javascript.

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
README.md
README.md
 
 
stringFunctions.h
stringFunctions.h
 
 

Repository files navigation

Hi, I'm Prabeen! 👋

🚀 About Me

I'm a developer... I know web development and app development.

🛠 Skills

Javascript, HTML, CSS, C++,Java...

🔗 Links

instagram

String Functions

This header file has a functions which are only use in java and javascript.

Functions

  • trim()
  • trimStart()
  • trimEnd()
  • indexOf()
  • charAt()
  • capitalize()
  • toLowerCase()
  • toUpperCase()
  • slice()
  • substr()
  • substring()
  • isEndsWith()
  • isStartsWith()

Advantages

  • Save Time
  • Easy to Use

Examples

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
}

About

This header file has a functions which are using in javascript.

Topics

c-headerc-header-filecppcpp-headercpp-librarycpp-programmingheaderjavascript-stringsstring-functionsstring-manipulation

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.