Questions tagged [character-replacement]

72 questions
0
votes
1 answer

Replace XXX characters in character array to an int value in C++

I have a character array of some size in C++ program char current_time[30]; The value of the character array is 2015-02-24T21:39:02.xxx+0800 The "xxx" in the character array must be replaced with a three digit number which is stored in a…
0
votes
3 answers

C# Stringbuilder replace with a null value

Im trying to use Stringbuilder to build me a csv file and some of the fields from the files I'm using have double quotes in. I have this code as you can see I am trying to use the .replace to remove the " and replace with nothing, this throws an…
Greyhounddad
  • 115
  • 3
  • 9
0
votes
1 answer

R input file contains the value #NUM! I want to replace these with NA. How?

I am reading quite a number of .csv files originating from Excel, into R. Some cells contain the value '#NUM!', which I guess results from dividing by zero. In any case, R does not like it. And since I have many files, I would like to replace the…
SigneMaten
  • 493
  • 1
  • 6
  • 13
0
votes
1 answer

How do you replace pre-entered characters (one at a time) in the JTextField?

I am trying to create a text field that at first contains only underscores and dashes, in which the user will enter numbers, for entering social security numbers. Every time the user enters a character, the underscore in the string will be replaced…
sdeole8264
  • 21
  • 1
0
votes
1 answer

Replace substrings with characters in Cocoa

I'm quite new to Cocoa programming and I'm tiring my best to create a program which will have the user input text into a text field and then press a button. When the button is pressed the text is supposed to replace certain substrings to certain…
0
votes
1 answer

String whitespace replacement error when using string.join

Trying to join a list of strings together using string.join. When I use the Separator string " OR " the white spaces are being replaced with "+" which is breaking my targetUri string. Below is the code used to join. if…
-1
votes
3 answers

Changing the Values with Specific Character from Data Frame in R

My data frame like this. X Y Z 10.5 m³/s 15. m³/s 14.3 m³/s 10. m³/s 11. 5m³/s 16.7 m³/s 10.8 m³/s 15.7 m³/s 1.5 m³/s I have to delete some specific characters from my data frame. In order to…
Enes
  • 33
  • 3
-1
votes
3 answers

How to replace the specified dash with the letter

I wish to write a hangman program and in order to do so, I have to replace the hash ('-') letter(s) with the user's guessed letter (guess). But when I run the code, it replaces all the hashes with the user's guess letter. The code seems okay but I…
-1
votes
2 answers

Change Letters into Numbers seperated by commas?

I am trying to create a button that displays the text from the "TextCollector" input as numbers seperated by commas and ignores any symbol that is not in the alphabet. Update: I also need it to ignore the fact that a letter is…
Odie
  • 15
  • 4
-1
votes
2 answers

Search and Replace a string in text file

I would like to search for a line in a text file which contains the string "SECTION=C-BEAM" and replace the first 13 characters in the "next line" by reading a pattern from first line (pattern highlighted in bold (see example below - read 1.558 from…
user2001139
  • 49
  • 1
  • 2
  • 7
-1
votes
2 answers

Url Romanization Issues

I am using Xenforo forum script. for non english character on threads title, there is a function converting non english character to english character. whenever I post "ö" is converting to "oe". but functions array is; $title = strtr($title, array( …
ahmetlutfu
  • 325
  • 2
  • 9
-2
votes
3 answers

replace CR LF in text file using `sed` or `fart` (Find And Replace Text)

I have a 1.5 GB Windows text file with some lines ending with LF and most of lines ending with CR+LF Can you please help with sed script which will replace all CR+LF with $|$ replace all LF with CR+LF replace back all $|$ with CR+LF I have…
1 2 3 4
5