Sunteți pe pagina 1din 3

1.

String

syntax: String(number, character)

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:

syntax: InStr([start, ] string1, string2[, compare]) start-optional compare-0,1 returns numbers

4.instrrev:

syntax: InStrRev(string1, string2[, start[, compare]])

star and compareoptional returns numbers

Returns the position of an occurrence of one string within another, from the end of string. String that has been converted to uppercase.

c="asdgfdsai" d="s" e=instrrev(c,d) print e f=instr(c,d) print f b="iibc" c=ucase(b) print c

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:

SYNTAX: Left(string, length)

Vara

8.MID:

SYNTAX: Mid(string, start[, length])

Hai girl Hai boy laxmi

SYNTAX: Right(string, length) 9. Right:

Returns a specified number of characters from the right side of a string.

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

Abcd Abcd Abcd

13.REPLACE:

SYNTAX: Replace(expression, find, replacewith[, start[, count[, compare]]])

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

Returns a value indicating the result of a string comparison.

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

0 (equal) -1(lesser) 1(greater)

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

My=23.45 My2=cstr(23.45) Print my2

S-ar putea să vă placă și