473,434 Members | 1,522 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

text replacement

Hello,

I am writing a hangman game for my VB class and we did not cover
string manipulation until this week, the final week. I can take in a
word or phrase up to 30 characters and create the necessary dashes for
the number of characters, and also display the correct letters in the
correct spots...however I am struggling to get it to work right when I
perform the conversion from letters to dashes to keep spaces in the
right character locations. Should I be using 2 or more variables to
keep things straight?

thanks in advance,

Mike curran
Jul 17 '05 #1
2 2741
Hi,

I do not understand your question, can you provide some examples of what you
are trying to do and explain both the current result as well as the expected
result?

Regards
"Mike Curran" <mi*********@hotmail.com> wrote in message
news:aa**************************@posting.google.c om...
Hello,

I am writing a hangman game for my VB class and we did not cover
string manipulation until this week, the final week. I can take in a
word or phrase up to 30 characters and create the necessary dashes for
the number of characters, and also display the correct letters in the
correct spots...however I am struggling to get it to work right when I
perform the conversion from letters to dashes to keep spaces in the
right character locations. Should I be using 2 or more variables to
keep things straight?

thanks in advance,

Mike curran
Jul 17 '05 #2
"Mike Curran" <mi*********@hotmail.com> wrote
Hello,

I am writing a hangman game for my VB class and we did not cover
string manipulation until this week, the final week. I can take in a
word or phrase up to 30 characters and create the necessary dashes for
the number of characters, and also display the correct letters in the
correct spots...however I am struggling to get it to work right when I
perform the conversion from letters to dashes to keep spaces in the
right character locations. Should I be using 2 or more variables to
keep things straight?

thanks in advance,

Yes. keep one string that has the answer, and another that indicates
how it should be displayed on the screen. After each guess, check
to see if that guess is correct, and adjust the screen string accordingly.
If the string for the screen ever matches the answer string, you
know they guessed the word (or phrase).

LfS


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Xah Lee | last post by:
20050207 text pattern matching # -*- coding: utf-8 -*- # Python # suppose you want to replace all strings of the form # <img src="some.gif" width="30" height="20"> # to # <img...
24
by: Markus Ernst | last post by:
Hi I have a title with a title gif: <h1><img src="mytitle.gif" alt="This is my title"></h1> So this is text-based browser and search-engine friendly and can be easily formatted with a style...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
5
by: D | last post by:
hi there , i want to do something fairly simple (well it was simple in PERL) using the replace function of Regex... but i cannot find the docs to help me on it... i want to use a regex to find a...
12
by: Charlie King | last post by:
As I understand it, the use of FIR* to replace heading tags with images in visually enabled CSS browsers is now frowned upon on the basis that some screen readers will *nor* read back text that is...
1
by: Jeremy | last post by:
I have a script that runs a regular expression replace on all text in the document. Currently, I recurse the entire document looking for text nodes and run the replacement on the text nodes when I...
13
by: DH | last post by:
Hi, I'm trying to strip the html and other useless junk from a html page.. Id like to create something like an automated text editor, where it takes the keywords from a txt file and removes them...
18
by: Umesh | last post by:
Do you have any answer to it? thx.
16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
0
by: rmeshksar | last post by:
Hi, I would like to do text replacement using RegEx and use the following statement: Regex.Replace(input, pattern, replacement, RegexOptions.IgnoreCase) It works fine in all cases except in the...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.