String Functions Explained Los Angeles CA

Visual Basic provides several functions to format and retrieve parts of strings.

Local Companies

Moyea Software
92295612365
Hot building, ring street
LA, CA
Interneer Inc.
8005586832 x85
6101 W. Centinela Ave.
Culver City, CA
Cornerstone Concepts Inc
818-247-3909
600 W Broadway
Glendale, CA
Greene Computer Corporation
(818) 956-4961
200 S. Louise Street
Glendale, CA
Corticalx Inc Software Solutions & Technology
818-500-0881
425 E Colorado St
Glendale, CA
Alphatier Systems
818-409-8920
517 Griswold St
Glendale, CA
TimeTECH - Customizable Time and Attendance / Workforce Management Solutions
905-677-7009
7420 Airport Rd 203
Mississauga, CA
Hutchinson & Bloodgood, LLP
(818) 637-5000
101 N. Brand Blvd. #1600
Glendale, CA
Telsoft Solutions
818-545-8680
100 N Brand Blvd
Glendale, CA
Abraxas Technologies Inc
818-502-9100
450 N Brand Blvd
Glendale, CA

provided by: 
Originally published at Internet.com


Visual Basic provides several functions to format and retrieve parts of strings.

Joining strings with &

You can use the & operator to join two strings. This operation is called concatenation. For example: FirstString = "This string has " SecondString = "been concatenated!" NewString = FirstString & SecondString

NewString would contain "This string has been concatenated!". Note that you need a space at the end of the first string or at the beginning of the second string, so that there is a space between "has" and "been".

Left$, Right$

These functions retrieve part of the string. The Left$ function returns characters from the left hand side, and the Right$ function returns characters from the right hand side. This is what they do: MyString = "This is a nice long string" LeftString = Left$(MyString, 7) RightString = Right$(MyString, 6)

LeftString contains the text "This is", and RightString contains the text "string".

Syntax Left$(string, length) Right$(string, length)

Mid$

This function is used to retrieve part of a string, much like Left$ and Right$. This is how it is used: MyString = "This is a nice long string" NewString = Mid$(MyString, 6, 21)

NewString now contains "is a nice long string"

Syntax Mid(string, start[, length])

UCase$, LCase$

Use these two functions to convert a string to entirely upper case or entirely lower case characters. This is very useful if you want to do a case insensitive search, or if a password is not case sensitive. For example: MyString = "This is a nice long string" UCaseString = UCase$(MyString) LCaseString = LCase$(MyString)

UCaseString contains "THIS IS A NICE LONG STRING", and LCaseString contains "this is a nice long string". This can be used practically: PasswordAttempt = "MyPaSs" ActualPassword = "mYpAsS"If PasswordAttempt = _ ActualPassword Then succeeded1 = True Else succeeded1 = False End If If UCase$(PasswordAttempt) = UCase$(ActualPassword) _ Then succeeded2 = True Else succeeded2 = False End If

In this case, succeeded1 would be False, and suceeded2 would be True. This is because the two actual passwords do not equal each other, but when they are both converted into upper case, they do equal each other.

Syntax Mid(string, start[, length])

String$

This function returns a string of repeating characters. For example, String$(20, "*"), would return "********************".

Syntax String(number, character)

Len

This function returns the length of a string. It is useful in a For...Next loop to do something to each character in a string. For example: mystring = "Hello world!" mylen = Len(mystring) For charnum = 1 To mylen Debug.Print Mid$(mystring, charnum, 1) Next

Here you will get H, e, l, l, o, , w, o, r, l, d, !, printed out in the debug widow, with each character on a separate line. mylen returns 11 because the length of the string is 11.

Syntax Len(string)

Watch out soon for advanced string functions, where we will show you how to do search and replace facilities, and look at the other string functions.

Author: John Percival

Read article at Internet.com site

Featured Local Company

Moyea Software

92295612365
Hot building, ring street
LA, CA

Related Local Events
Automation Technology Expo West (ATX West)
Dates: 2/9/2010 - 2/11/2010
Location: Anaheim Convention Center
Anaheim, CA
View Details

SOLAR POWER - Exhibition and Conference
Dates: 10/12/2010 - 10/14/2010
Location: Los Angeles Convention & Exhibition Center
Los Angeles, CA
View Details

REAL-TIME & EMBEDDED COMPUTING CONFERENCE - LONG BEACH 2009
Dates: 10/1/2009 - 10/1/2009
Location: Marriott Long Beach
Long Beach, CA
View Details

2009 IEEE Petroleum and Chemical Industry Technical Conference (PCIC 2009)
Dates: 9/14/2009 - 9/16/2009
Location:
Anaheim, CA
View Details

Medical Design & Manufacturing - Trade
Dates: 6/9/2009 - 6/11/2009
Location: CANON COMMUNICATIONS LLC
Los Angeles, CA
View Details