Questions tagged as 'string'

2
answers

Convert String Value to Hexadecimal without changing format

I'm using the following code in a Class. public Int16 Endereco = 0x7302; byte[] Data = BitConverter.GetBytes(Endereco); Array.Reverse(Data); [...] I would like to receive the value for the Endereco variable of a String...
asked by 31.01.2017 / 12:25
1
answer

How to transform a string into HTML C #

I'm using a component and need to load it with HTML snippet that comes in a variable. For that I created this JQuery: $(document).ready(function(){ $('.mentions-kinder').html('@HttpUtility.HtmlDecode(Model.FormulaRecover)'); }); But eve...
asked by 18.03.2017 / 23:26
3
answers

How do I use replace () for the last occurrence?

The String#replaceFirst() method is used to replace the first occurrence of a substring in a string , but how should I proceed if I want to do this with the last occurrence? The question is how do I make the condition to parse the...
asked by 08.03.2015 / 16:43
3
answers

Extract date with Regex

I'm trying to extract a date from a String, but I'm not getting it. Example: String stringQualquer = "um teste qualquer12/02/1998 19/09/1880 Nulo"; I want to get the first date of this example "12/02/1998". I tried that, but it did no...
asked by 02.08.2018 / 21:35
4
answers

Assigning Arrays in Java

I own two String Arrays and I have to compare them. After the comparison I must assign the repeated values in another Array. My problem is that I want to assign just the repeated Strings without the Strings that do not repeat. Code: //A...
asked by 16.07.2017 / 19:56
2
answers

Returning a case sensitive record

I have a constraint in the bank that is all with its capitalized name. How do I count find it using UPPER ? Because I want to pass where a lowercase name to return. This my query is not working. select count(*) fr...
asked by 31.08.2017 / 20:17
1
answer

Using ToUInt64 to format string is correct?

Looking for a practical way to format string I came across the following: Convert.ToUInt64(string).ToString(@"00000\-000") . Is it a good practice to use this method to format strings ? Is there a recommended way? Here...
asked by 10.08.2016 / 22:48
2
answers

Regular expression to retrieve strings that begin with a colon (:)

I need a regular expression to retrieve a list of strings that start with the colon (":") and end with the space character or end of parentheses (")"). > Example: String texto = "(:TEXTOQUALQUER NADA DO FOI :TEXTOQQDENOVO SERÁ DE NOVO :TEX...
asked by 11.12.2014 / 20:15
1
answer

Char comparison, ignoring case sensitive

The proposal is to create a program that compares the n positions of the two vectors and returns whether they are equal or not. So far so good, but I do not know how I can ignore case sensitive . Here's what I've done so far: //Questão 7...
asked by 09.07.2016 / 03:10
1
answer

Function "strcmp ()" working without adding "string.h"

I wrote an algorithm in C that uses the strcmp() function. Even forgetting to add the string.h algorithm worked. I would like to understand how it worked since I only found this function in the string.h library. #includ...
asked by 19.12.2018 / 20:22