“remplacer la fonction” Réponses codées

chaîne Remplacer

string a = "String";
string b = a.Replace("i", "o"); // Strong
       b = a.Insert(0, "My ");  // My String
       b = a.Remove(0, 3);      // ing
       b = a.Substring(0, 3);   // Str
       b = a.ToUpper();         // STRING
int    i = a.Length;            // 6
PrashantUnity

remplacer la fonction

#replace(a,b) is the function which can replace the 'abc' word to 'klmn' word
example
a=input(' sentence :')
b=input(' word to be replaced :')
c=input(' word to be replaced with :')
d=a.replace(b,c)
print(d)
#output:
'''
sentence :richard play with pixis and natasha, rahim play along johan,rosel and ethan 
word to be replaced :play
word to be replaced with :go
richard go with pixis and natasha, rahim go along johan,rosel and ethan 
'''
Gr@Y_orphan_ViLL@in##

remplacer la fonction

const myText = 'The weather is cold';
const newString = myText.replace('cold', 'warm');
console.log(newString); // Should print "The weather is warm"
// the replace() string function takes a string,
// replaces one substring with another, and returns
// a new string with the replacement made
Concerned Curlew

Réponses similaires à “remplacer la fonction”

Questions similaires à “remplacer la fonction”

Plus de réponses similaires à “remplacer la fonction” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code