Questions tagged as 'string'

3
answers

Format a string with time

I'm trying to format a string that already has date and time, but this string just has to get the time I'm trying in this way more does not work: > Recovering from the database. string dtSolicitacao = String.IsNullOrEmpty(Convert.ToStri...
asked by 27.08.2015 / 14:01
1
answer

Calculate lexicographically letter of a string

My function needs to lexicographically calculate the value of the characters (by the ASCII table) of the string. For example:    "Alibaba" and "Came" 'A' = 65 and 'V' = 86 65 - 86 = -21. Then the function would return l1 and if it...
asked by 15.06.2018 / 20:49
1
answer

string transformation in R

I would like to know if I can make a remark about a string variable in upper case. For example: #como esta: x=c("Casa branca","Barco Azul","casa preta") > x [1] "Casa branca" "Barco Azul" "casa preta" #como ficaria: [1] "CASA BRANCA" "B...
asked by 15.01.2018 / 12:50
3
answers

Is there any way to get a particular row in a string?

I have this example string: s = [[Pão com Requeijão]] Is there any way to get only the second line of the string? If so, how?     
asked by 03.01.2018 / 20:28
2
answers

How to convert a String to TNotifyEvent in Delphi?

I want to change the OnTimer event of a TTimer in my project at run time, I tried as follows: Timer1.OnTimer:= ('close'); But Delphi reports this: (E2010 Incompatible types: 'TNotifyEvent' and 'string') , how can I convert String...
asked by 29.10.2015 / 01:31
2
answers

How to count occurrences of a substring in a string in Python?

How do I read two strings and check the number of occurrences of the second string in the first? Example: If the first string entered is "abracadabra" and the second "bra" , then the number of occurrences will be 2 .     
asked by 17.04.2017 / 04:33
1
answer

Array conversion into string

I have the following array as I transform it into a string. This string would be used to save the products of the shopping cart in MySQL. Then they have several snacks and products: products 5,2,5 use this code implode(',', $adicion...
asked by 23.09.2014 / 06:30
3
answers

Check in JavaScript if String has x number string

Hello, I'd like to know if you have any way to check if a String has JavaScript in it, for example, random number to trigger an event. Here's how:    abc123de45 It should be false    abc13525de It should be true    ab12cde...
asked by 03.02.2017 / 15:45
1
answer

Make comparison using String.Contains () disregarding accents and case

I need to check how to make a comparison between strings , in C #, using the Contains() method that disregards both accent sensitivity and case / strong> of a string . Example: var mainStr = "Acentuação"; mainStr.Contains("acen...
asked by 24.01.2017 / 19:03
2
answers

Convert string to list?

I needed to pass%% of type: 0.4350 0.8798 0.0099 1 for a string [0.4350, 0.8798, 0.0099, 1] with a simple list . How can I do this?     
asked by 01.05.2017 / 16:46