Questions tagged [tolower]

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

148 questions
2
votes
2 answers

Using set_names vs. mutate(colnames) when changing data frame column names to lower case

A quick question that I was looking to understand better. Data: df1 <- data.frame(COLUMN_1 = letters[1:3], COLUMN_2 = 1:3) > df1 COLUMN_1 COLUMN_2 1 a 1 2 b 2 3 c 3 Why does this work in setting data…
2
votes
5 answers

AWK Sentence doing looping for in the code to capitalize some fields

The code awk '{for(i=1;i<=NF;++i){$i=toupper(substr($i,1,1))tolower(substr($i,2));}print}' I need to capitalize the first character of every word in some fields. This loop look for all the characters in the lines and replace the first charcater in…
2
votes
2 answers

Read input from a file, capitalize first letter, make every other letter lowercase, and output into a separate file

I am supposed to ask the user for two file names (input and output files). The contents from the input file should be read and the first letter of each sentence should be made uppercase while every other letter should be made lowercase. The results…
2
votes
2 answers

Replace all characters, except the first, in every word of a string with lowercase

I have a string text <- "This String IS a tESt. TRYING TO fINd a waY to do ThiS." and I would like to use gsub in R to replace all characters in every word that is not the first letter to lowercase. Is this possible? desired_output <- "This String…
Ankhnesmerira
  • 1,386
  • 15
  • 29
2
votes
2 answers

How to use Logic App tolower() function

Using the below code as a sample (there would be way more results), I am constructing an if true/false statement that will have the input as either upper or lower case. I am unsure how to utilise the tolower() function that will force the input to…
Beefcake
  • 733
  • 2
  • 12
  • 37
2
votes
0 answers

Bad coding practise when using ToLower() and not ToLowerInvariant()

I was writing my code for searching in a database, so I wrote this code: public IEnumerable SearchInCustomers(string Search) { return Company.Where(w => (w.CompanyName.ToLower().Contains(Search.ToLower())) || …
Max
  • 846
  • 1
  • 9
  • 26
2
votes
1 answer

string.ToLowerInvariant() in C# vs String.ToLowerCase(Culture.ROOT) in Java for Turkish İ

I see a difference in behavior between C# (.NET v4.0) and Java for converting 'İ' to lowercase with "invariant" culture. In Java, "İ".toLowerCase(Locale.ROOT) returns 'i'. In C#, "İ".ToLowerInvariant() and "İ".ToLower(CultureInfo.InvariantCulture)…
bittusarkar
  • 6,247
  • 3
  • 30
  • 50
2
votes
3 answers

toupper tolower

How to use topper and tolower in the C language? I've tried to run the program that I've made, it runs properly the problem is since I should submit it to a website to check it whether it's right or wrong, every time I submit it, it says compile…
Jasson Harsojo
  • 237
  • 1
  • 6
  • 15
2
votes
8 answers

Java-toggle alphabet case in string

I have my code to switch the case from upper to lower and vice versa. I also have it to where it will toggle upper to lower, and lower to upper. My question is; is there a way I can get it to also include the character such as a comma or a period.…
ecain
  • 1,282
  • 5
  • 23
  • 54
2
votes
2 answers

How to make languages-friendly function to lower?

I want one function 'to lower' (from word) to work correctly on two languages, for example, english and russian. What should I do? Should I use std::wstring for it, or I can go along with std::string? Also I want it to be cross-platform and don't…
Ava_Katushka
  • 144
  • 8
2
votes
3 answers

All elements of String() Array ToLower, using LINQ

How Can I set to lower all the elements of an string array using LINQ? Dim fileExtensions() As String = {"Mp3", "mP4", "wMw", "weBM", Nothing, ""} Dim ToLower_fileExtensions = fileExtensions().Select... (not using For)
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
2
votes
1 answer

Why does my C program print "(null)" during execution of tolower conversion of characters?

I wrote this program to try to understand C a little better. It works, but for some reason, (null) is printed before the correct output. My code: /* This program will take a string input input from the keyboard, convert the string into all lowercase…
Johnny
  • 675
  • 3
  • 15
  • 25
2
votes
3 answers

using toupper and tolower in visual basic

Trying to get this to change the case of the first letter of the parsed strings segments. So if a user enters "JOHN WAYNE DOE" in txtName then it would display "John Wayne Doe" I entered it the way it shows it in the book but the message box…
thewaytonever
  • 39
  • 1
  • 6
2
votes
3 answers

Converting lower/upper case letters without ctype.h

I just saw that this could technically work, the only mistake I couldn´t resolve was the last ASCII character that gets printed everytime I test it out, I also tested this out without using the name variable, I mean just making a substraction of 32…
Yudop
  • 131
  • 3
  • 12
2
votes
2 answers

tolower() not working

The below code snippet is used to convert a string to lower case. int main() { unsigned char s[] = "AbS.d_"; tolower(s); printf("%s\n", s); return 0; } I am getting the output as: AbS.d_ Why the string is not being converted?
Green goblin
  • 9,898
  • 13
  • 71
  • 100
1 2
3
9 10