Breaking News
You are here: Home / Notes / SEM-1 / CPPM / String Function

String Function

String Function

 

LEN Used to find the Length of a String
Syntax LEN(string)
Example PRINT LEN(“Hello India”)
output 11

 

MID$ Used to fetch sub-string from main String
Syntax MID$(string,start,integer) 

Where,

string=actual string

start=starting position to fetch sub-string

integer=no. of characters from the main string from start position

Example PRINT MID$(“Hello India”,7,5)
Output India

 

 

RIGHT$ Used to fetch sub-string of given characters from main String from right side
Syntax RIGHT$(String, integer) 

Where,

string=actual string

integer=no. of characters from the main string from right side.

Example PRINT RIGHT$(“Hello India”,5)
output India

 

RIGHT$ Used to fetch sub-string of given characters from main String from left side
Syntax LEFT$(String, integer) 

Where,

string=actual string

integer=no. of characters from the main string from left side.

Example PRINT LEFT$(“Hello India”,5)
output Hello

 

Download Paper Solutions from Below Link

About admin

Scroll To Top