Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 11:41 AM
Ken Fine
Guest
 
Posts: n/a
Default Interrogating string for number of characters, response.writing identical number of characters on new line

Suppose I have strString. I want to determine the length of strString in #
of characters, and write that number of characters on a subsequent line as a
dummy character, say a hypen.

In other words, I want to be able to dynamically create the following
presentation in ASCII:

Title title title title title title
-------------------------

Note that the number of hyphens equals the number of characters in "Title
title title title ...", which would be stuffed in strString.

Any help out there?

BTW, thanks to all the smarties in the group who have helped me out over the
past few years. The community has helped make my career.

-KF


  #2  
Old July 19th, 2005, 11:41 AM
Ray at
Guest
 
Posts: n/a
Default Re: Interrogating string for number of characters, response.writing identical number of characters on new line

theString = "Title title title title title title"
theChar = "-"
Response.Write String(Len(theString), theChar)

--

Ray at home
Microsoft ASP MVP


"Ken Fine" <kenfine@u.washington.edu> wrote in message
news:bvs99a$j7k$1@nntp6.u.washington.edu...[color=blue]
> Suppose I have strString. I want to determine the length of strString in #
> of characters, and write that number of characters on a subsequent line as[/color]
a[color=blue]
> dummy character, say a hypen.
>
> In other words, I want to be able to dynamically create the following
> presentation in ASCII:
>
> Title title title title title title
> -------------------------
>
> Note that the number of hyphens equals the number of characters in "Title
> title title title ...", which would be stuffed in strString.
>
> Any help out there?
>
> BTW, thanks to all the smarties in the group who have helped me out over[/color]
the[color=blue]
> past few years. The community has helped make my career.
>
> -KF
>
>[/color]


  #3  
Old July 19th, 2005, 11:41 AM
Ken Fine
Guest
 
Posts: n/a
Default Re: Interrogating string for number of characters, response.writing identical number of characters on new line

Works like a charm, so simple, so sweet...Thanks again, Ray at home.

-KF

"Ray at <%=sLocation%> [MVP]" <myFirstNameATlane34dotKOMM> wrote in message
news:OCC1ZR56DHA.2404@TK2MSFTNGP12.phx.gbl...[color=blue]
> theString = "Title title title title title title"
> theChar = "-"
> Response.Write String(Len(theString), theChar)
>
> --
>
> Ray at home
> Microsoft ASP MVP
>
>
> "Ken Fine" <kenfine@u.washington.edu> wrote in message
> news:bvs99a$j7k$1@nntp6.u.washington.edu...[color=green]
> > Suppose I have strString. I want to determine the length of strString in[/color][/color]
#[color=blue][color=green]
> > of characters, and write that number of characters on a subsequent line[/color][/color]
as[color=blue]
> a[color=green]
> > dummy character, say a hypen.
> >
> > In other words, I want to be able to dynamically create the following
> > presentation in ASCII:
> >
> > Title title title title title title
> > -------------------------
> >
> > Note that the number of hyphens equals the number of characters in[/color][/color]
"Title[color=blue][color=green]
> > title title title ...", which would be stuffed in strString.
> >
> > Any help out there?
> >
> > BTW, thanks to all the smarties in the group who have helped me out over[/color]
> the[color=green]
> > past few years. The community has helped make my career.
> >
> > -KF
> >
> >[/color]
>
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles