Google Search

Google
 

Monday, May 28, 2007

String Functions in .NET

Several built-in string functions perform string manipulations to augment simple concatenation with the "&" operator.

Function in ASP.NET

Asc() Returns the character code of the first character of a string.

Asc("A") returns 65.

Chr() Returns the display character of a character code.

Chr(65) returns "A".

GetChar() Returns the character at a specified position in a string, counting from 1.

GetChar("This is a string", 7) returns "s".

InStr() Returns the starting position in a string of a substring, counting from 1.

InStr("This is a string", "string") returns 11.

InStrRev() Returns the starting position in a string of a substring, searching from the end of the string.

InStr("This is a string", "string") returns 11.

LCase() Returns the lower-case conversion of a string.

LCase("THIS IS A STRING") returns "this is a string".

Left() Returns the left-most specified number of characters of a string.

Left("This is a string", 4) returns "This".

Len() Returns the length of a string.

Len("This is a string") returns 16.

LTrim() Removes any leading spaces from a string.

LTrim(" This is a string") returns "This is a string".

Mid() Returns a substring from a string, specified as the starting position (counting from 1) and the number of characters.

Mid("This is a string", 6, 4) returns "is a".

Replace() Replaces all occurences of a substring in a string.

Replace("This is a string", " s", " longer s") returns "This are a longer string" (replaces an "s" preceded by a blank space).

Right() Returns the right-most specified number of characters of a string.

Right("This is a string", 6) returns "string".

RTrim() Removes any trailing spaces from a string.

RTrim("This is a string ") returns "This is a string".

Str() Returns the string equivalent of a number.

Str(100) returns "100".

Space() Fills a string with a given number of spaces.
"This" & Space(5) & "string" returns "This string".

StrComp() Compares two strings. Return values are 0 (strings are equal), 1 (first string has the greater value), or -1 (second string has the greater value) based on sorting sequence.

StrComp("This is a string", "This string") returns -1.

StrReverse() Reverses the characters in a string.

StrReverse("This is a string") returns "gnirts a si sihT".

Trim() Removes any leading and trailing spaces from a string.

Trim(" This is a string ") returns "This is a string".

UCase() Returns the upper-case conversion of a string.

UCase("This is a string") returns "THIS IS A STRING".

Val() Converts a numeric expression to a number.

Val( (1 + 2 + 3)^2 ) returns 36.

29 comments:

Anonymous said...

this is asp classic

Anonymous said...

Thanks on your mаrvelous posting! I definitely enjoyeԁ гeading it, you will be a gгeat аuthor.

I will bе surе to booκmark your blog and wіll
oftеn come bаck someday. I want to encоurage уou tо ultimately continue уour grеаt posts, have a nice moгning!


my blοg do hcg drops work

Anonymous said...

I'm not sure why but this web site is loading very slow for
me. Is anyone else having this issue or is it a issue on my end?
I'll check back later and see if the problem still exists.


Feel free to surf to my weblog - phrase diet program

Anonymous said...

We've noticed this time and again and it's true.

Also visit my homepage http://clearcydia.com/sbsettings-ios-7-full-review/'>source - www.bonuslife.org,

Anonymous said...

Hі! Someone in my Myspace group shared this website witҺ us so I came to chеck іt out.
I'm definitely enjoying the information. I'm bookmarking and will be tweeting thіs to my followers!
Superb blog and wonderful style and design.

my web blog :: Fat Burning Furnace

Anonymous said...

I don't understand this article... You should check http://www.redsn0w.us/ for more details

Anonymous said...

chanel handbags for cheap
Hi there, I enjoy reading all of your post. I wanted to write a little comment to support you.

Anonymous said...

As well as making sure your web copy reads well
to promote your products and services, you need to include your
chosen keyword phrase in each page in the following way;.
If you want to find real ways to make money online just plan to
put in a little time and effort. Make a list of 10 blogs or so and experiment with these by posting on them
each day and seeing which blogs bring the most traffic then add and
delete from your list accordingly.

Anonymous said...

Thank you for the auspicious writeup. It in fact was a amusement account it.

Look advanced to far added agreeable from you! However, how can we communicate?


Also visit my web site :: GHD Straighteners

Anonymous said...

The coffee plant wіll mаke a charming property plant.
Studies carried ߋut oon micce sҺowed that green tea protected brain cells fгom dying ɑnd restored damaged brain cells.
Menn ccan select fгom perfume - tɦe most
concentrated օf fragrances, designed tߋ apply only tߋ pulse points sincce it's thee longest lasting.


Мy web page; pillole per dimagrire

Anonymous said...

Overall, the BMW 3 Series Touring autos give nice price.
It's difficult to know in which to start. You will be mastering the significance of using insurance policies
for your amazing auto. http://mis.bus.ubu.Ac.th/informationSystem/?p=88210

Here is my web blog: aarp safe auto insurance company ()

Anonymous said...

I relish, cause I found just what I was looking for.
You have ended my 4 day lengthy hunt! God Bless you man. Have a
nice day. Bye

Review my web-site: Nunawading drain cleaning -
http://Rb-Tool.com/,

Anonymous said...

I read this piece of writing completely on the topic of the difference of
most recent and earlier technologies, it's awesome article.


Here is my web site - how to Lose 10 Pounds in 2 months

Anonymous said...

As the admin of this web page is working, no question very soon it will
be famous, due to its feature contents.

Here is my webpage ... weight Loss calculator

Anonymous said...

Good day! This is mmy first visiit too your blog!
We are a team of volunteers and startting a neww iniutiative in a ccommunity in tthe same niche.
Your blog provied uss useful information to
work on. You haave done a outstanding job!


my website; mobile warez

Anonymous said...

Por último tendremos el modo multijugador…Nuevamente nos encontramos con un juego arcade al que el multijugador a pantalla partida le sentaría genial,
y sin embargo no dispone de esa opción. With new tracks,
new sounds, with an impressive online multiplayer that will maybe
you have choosing hours, Mario Kart 7 can be a must
buy for any Mario fan or 3DS fan. The Legend of Zelda:
Ocarina of Time 3D (playable).

Stop by my weblog ridge racer slipstream hack (facebook.com)

Anonymous said...

Fantastic blog! Do you have any hints for aspiring writers?
I'm planning to start my own site soon but I'm a little lost
on everything. Would you recommend starting with a free platform like Wordpress or
go for a paid option? There are so many choices out there that I'm completely overwhelmed
.. Any recommendations? Bless you!

Check out my web site: Sensual Massage London; Melzian.Net,

Anonymous said...

Hello There. I discovered your weblog the use of msn. That is
a very well written article. I'll make sure to bookmark it and come back to read more of your helpful
information. Thank you for the post. I'll definitely return.

Feel free to surf to my web blog; Replica Oakleys

Anonymous said...

Wow, wonderful weblog layout! How lengthy have you ever
been blogging for? you make running a blog glance easy. The entire look of your
web site is excellent, as smartly as the content!


Feel free to surf to my blog post ... webpage - ,

alat bantu sex said...

Saat ini alat bantu sex banyak sekali diminati,mungkin hal ini terjadi karena tuntutan zaman yang semakin moderen dan aktifitas manusia yang begitu tinggi seperti meninggalkan pasangannya dengan alasan perkerjaan dan urusan tertentu yang tidak mungkinkan untuk membawa pasangannya dengan adanya alat bantu bisa di jadikan solusi untuk mengatasi rasa kesepian karena alat masturbasi membantu menyalurkan hasrat bercinta yang sudah menjadi kebutuan dan alat bantu wanita ini bisa mencegah dari tindakan perselingkuhan. jauh dari pasangan atau istri memang bisa membuat pria merasa kesepian, tetapi itu semua bisa terjadi jika keadaan seperti tuntunan pekerjaan atau ada urusan tertentu yang tidak mungkin untuk membawa istri,dan hal ini bisa menjadi persoalan jika hasrat ingin bercinta muncul dan ingin di salurkan namun kalau istri sedang tidak ada didekatnya tentu saja hal ini sulit untuk di lakukan, Dengan adanya boneka sex atau bisa di kenal dengan boneka full body atau pilihan lain yang lebih simpel seperti vagina getar bisa anda jadikan alternatif untuk mengatasi masalah anda.

Anonymous said...

foto

obat aborsi said...

This is too informative. i like your post. thanks for share cara menggugurkan kandungan

cara menggugurkan kandungan said...

This article is very useful and add knowledge to the readers .obat menggugurkan kandungan

obat aborsi said...

I like this post,And I guess that they having fun to read this post,they shall take a good site to make a information,thanks for sharing it to me.
cara menggugurkan kandungan

obat aborsi said...

It's actually a great and helpful piece of information. I am satisfied that you just shared this useful information for us.
Thanks for sharing.

yanmaneee said...

yeezy
moncler jackets
golden goose
goyard
adidas yeezy
goyard handbags
supreme hoodie
golden goose outlet
yeezy supply
supreme t shirt

codegeekslab said...

Banyaknya situs poker abal-abal yang ada di internet membuat kamu jadi ragu-ragu dalam memilih situs idn poker untuk main ? mau tau situs poker yang sudah pasti terpercaya dan berlisensi remsi ? cek lengkapnya disini : codegeekslab

IDN poker uang asli said...

jika anda suka bermain judi poker online dengan keuntungan uang asli anda bisa bermain di Situs IDN Poker dengan karena memiliki permainan judi terlengkap seperti Ceme Online, Omaha, Poker Online dan Masih banyak lagi permainan judi yang bisa dimainkan dan metode depositnya yang mudah bisa melalui Bank Lokal seperti BCA, BNI, BRI dan Mandiri untuk mempermudah semua pemain melakukan transaksi deposit dengan aman dan cepat.
https://paclhr.edu.pk/members/idnpoker991/

IDN Poker online said...

situs judi IDN Poker online terbesar di asia dengan bonus terbesar dan terbanyak di Asia, dengan permainan yang lengkap dan halaman situs yang unik, disini para bettor tidak akan mudah bosan saat bermain poker online