Questions tagged [toupper]

In C / C++ toupper function converts a given character to uppercase according to the character conversion rules defined by the currently installed C locale. In the default "C" locale, the following lowercase letters abcdefghijklmnopqrstuvwxyz are replaced with respective uppercase letters ABCDEFGHIJKLMNOPQRSTUVWXYZ.

176 questions
1
vote
3 answers

ToUpper method for a string of words in a foreach loop not working

I have a string array of names, and I want all the names to be in all caps. This is my simple code, but it does not do anything to the names. foreach (string x in names) { x.ToUpper(); Console.WriteLine("{0}", x); }
1
vote
4 answers

perform toUpperCase() each time the content of an input field is changed

I want to perform toUpperCase() each time the content of an input field is changed. I mean not when the field lost focus, but each time a character is typed. I try this which doesn't work (I'm fairly new to JQ)! $(".myClass").change(function () { …
user3553401
  • 109
  • 2
  • 15
1
vote
3 answers

toupper function in C

#include #include char* strcaps(char* s) { while (*s != '\0') { toupper(*s); s++; } return s; } . int main() { char makeCap[100]; printf("Type what…
Jakkie Chan
  • 317
  • 4
  • 14
1
vote
3 answers

Which Regular Expressions and toUpper combination is faster?

I have two text boxes, one for the input and another for the output. I need to filter only Hexadecimals characters from input and output it in uppercase. I have checked that using Regular Expressions (Regex) is much faster than using loop. My…
David
  • 3,957
  • 2
  • 28
  • 52
1
vote
2 answers

Implementing toUpper function in MIPS

So I'm trying to implement a kind of toUpper function in MIPS. The function has access to two variables: $a0, which is the starting address of a string of characters, and $a1 which is the length of the string. I'm trying to loop through the string…
Connor Black
  • 6,921
  • 12
  • 39
  • 70
1
vote
5 answers

C++ error trying to 'rewrite' char array

I am trying to convert a string into all upper case using the code: int client::get_upper(char*item_in) { int k ; char * temp_str; int length = strlen(item_in); temp_str = new char [length+1]; for(k = 0; k < length; ++k) …
Flexo1515
  • 1,007
  • 1
  • 10
  • 27
0
votes
2 answers

CS50 Lab 2 giving me some trouble

So I've been working on a lot of CS50 projects lately and I've stumbled on a roadblock when I got to Lab 2. Now, this lab was really difficult for me, but I managed to get it work... sort of. When I run it, it displays the two prompts, but no matter…
0
votes
0 answers

Why will not my code print to the output text file the characters in the input text file with lowercase letters becoming uppercase and vice verse?

I am trying to create a code implementing pipelining to get the characters in an input file ("input.txt") and have the program capitalize the lowercase letters and vice versa. Here is my code: #include #include #include…
0
votes
1 answer

Capitalize first letters string of words and add word to string

I working a power automate flow and I've been struggling for quite a while to create a variable which I need to populate "County Name" in my word template. This flow allows a County staff member to fill out a form and then those MS Form responses…
Baby Yoda
  • 34
  • 6
0
votes
1 answer

Make uppercase on the first letter of user input C#

I am trying to make an easy and clean solution for my code to recieve a name from input from user and printing it out with uppercase on the first letter only. I have tried for a long time but cannot come to a solution, I am now trying to make it by…
zveuse
  • 7
  • 2
0
votes
0 answers

clang forces use of 5 argument transform

Why does clang insist on choosing the 5 argument form of transform when there is a matching function signature using 4 arguments? The compiler seems to think toupper is a binary operator, which is strange. error message: enum_days.cpp:18:5: error:…
Lewis Levin
  • 85
  • 11
0
votes
1 answer

Toupper function doesn't work properly in 1d array (c)

I'm trying to uppercase the keywords in 1d array by using function toupper and additional array, but the code doesn't work properly My code is: #include #include #include int main () { char prog1[20], prog2[20]; …
Lvrnnk
  • 39
  • 5
0
votes
1 answer

How to use toupper on char * in C?

So I have a problem with using toupper on char *. Let me show you what I tried. #include #include #include int main() { char* shi = command->args[0]; //which is "binance" while(*shi) { …
0
votes
5 answers

Checking if input is a single character and meets validation in C

I'm new to the C language and have to write a program that asks the user to type the letter "t" in uppercase or lowercase and then press enter. The program should inform you if you entered the letter "t" or other data. The case of a user's input…
Veanty
  • 33
  • 5
0
votes
1 answer

Array struct toupper for whole string and after space

I'm trying to put in upper case a first letter in a name. Something does not work. Also, I want to put whole surname in upper case. Which doesn't work too. Somehow only the first letter(of the above mentioned) get an upper case. I have this code,…
manjitolo
  • 53
  • 6