String Function
String Function
String
Returns a repeating c=string (3,"a") character print c string of the length specified String consisting of the specified number of spaces between the two string. Returns the position of the first occurrence of one string within another.
c=space(10) print c d="good" &space(20) & "MORNING" print d a= "varalakshmi" b=instr(1,a,"A",0) print b a= "varalakshmi" c=instr(1,a,"A",1) print c
Aaa
2. Space:
syntax: Space(number)
good morning
3.Instr:
4.instrrev:
Returns the position of an occurrence of one string within another, from the end of string. String that has been converted to uppercase.
7 2
IIBC
5.Ucase:
syntax: UCase(string)
6.Lcase:
syntax: LCase(string)
string that has been b="IIBC" c=Lcase(b) converted to print c lowercase Returns a specified a="varalaxmi" b=left(a,4) number of characters from the print b left side of a string. Returns a specified number of characters from a string.
a=Hai boy ,Hai girl" c=mid(a,10) print c k=mid(a,1,8) print k a = "varalaxmi" b = right (a,5) print b
Iibc
7.LEFT:
Vara
8.MID:
10. TRIM:
SYNTAX:
LTrim(string) RTrim(string) Trim(string)
Returns a copy of a string without leading spaces (LTrim), trailing spaces (RTrim), or both leading and trailing spaces (Trim) Returns a string in which a specified substring has been replaced with another substring a specified number of times.
M= LTrim (" abcd") M1=RTrim(" abcd ") M2=Trim (" abcd ") print M print M1 print M2 b="ssbc" a=Replace(b,"s","I") Print a
13.REPLACE:
IIbc
14. LEN:
star and compareoptional Substitute Char SYNTAX: Len(string | Returns the varname) number of characters in a string or the number of bytes required to store a variable.
StrComp(string1, string2[, compare])
C=LEN("IIBC") PRINT C
15.StrComp
Dim MyStr1, MyStr2, MyComp MyStr1 = "ABCD": MyStr2 = "abcd" ' MyComp1 = StrComp(MyStr1, MyStr2, 1) MyComp2 = StrComp(MyStr1, MyStr2, 0) MyComp3 = StrComp(MyStr2, MyStr1) print mycomp1 print mycomp2 print mycomp3 a=StrReverse("IIBC") print a
16.Strreverse
17.Cstr
Syntax:ctsr(expression )
Returns a string in which the character order of a specified string is reversed. StrReverse(string1 ) Convert variant into string
IIBc