The algorithm to generate an abbreviation from a string may not be as dynamically sound as the algorithm utilized by the human mind, but it is possible. Here is a simple algorithm.
string word("dinosaur"), abbr("");
for each char in word
if char is consonant { add to abbr; }
endfor
This would transform "dinosaur" into "dnsr" and obviously that isn't what you would want.
You could count the characters, divide by two, take that integer result and gather that amount of characters followed by the last character as an abbreviation.
string word("dinosaur"), abbr("");
int length = word.length() / 2;
for (int i = 0; i < length; i++) {
if (i <= length)
abbr.push_back(word[i]);
}
abbr.push_back(word[length - 1]);
This would produce: "dinor" and that is definitely not a very useful abbreviation...
These algorithms are off the top of my head and I'm sure someone else could write better ones, but good luck with your endeavors.
string s = "asdfqwer"; s = s.ToUpper(System.Globalization.CultureInfo.CurrentCulture);
i dont no string for servlate
[ string toupper $str ] or [ string tolower $str ]
sdfdg
You can use any text-editor, notepad is an example.
This is not a question.
print c co com comp compu
c code for top down parser
You can create a separate string initially empty. Then using a loop, start at the end of the string and add it to the end of the other string. At the end of the loop, the other string would contain the reverse.
write program to concatenating two sting in 8086 assembly language
You have to declare it. The simplest way to do so is by using the Dim keyword. For example if you want a string variable called someString you would declare it thus: Dim someString as string
i dn't know. haha