finding first word having a particular char 'w' in a sentence
how can i find the first word in my sentence having 'w' character. This character can be present anywhere in my word. Lets take an example of sentence "Hi, what are you doing here abxwxyz?
So the result should be what.
I am assuming you mean the first word that starts with 'w'.
If its a structural sentence, then find the first 'w' Then check if the character before it is a space. If so then its what you are looking for. Be sure to watch out, if w is found at index 0. Then thats your answer.
i got an idea about vector from searching google.
i know how to read a string, but what i know is reading char by char that will not solve a problem.
because then i can find w but how will i extract the word haing w.
please help and correct if my approach is wrong.
If you know vectors, you certainly know how to read a string. If not, maybe you need to read your text about strings and input.
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...