What do you want to save?
Add Code snippet
New code examples
-
Java 2021-10-18 08:47:07
how to cut a certion part from a string in java
int startIndex = str.indexOf("("); int endIndex = str.indexOf(")"); String replacement = "I AM JUST A REPLACEMENT"; String toBeReplaced = str.substring(startIndex + 1, endIndex); System.out.println(str.replace(toBeReplaced, r... Add solution -
Javascript 2021-10-07 08:17:02
javascript extract json from string
function extractJSON(str) { var firstOpen, firstClose, candidate; firstOpen = str.indexOf('{', firstOpen + 1); do { firstClose = str.lastIndexOf('}'); console.log('firstOpen: ' + firstOpen, 'firstClose: ' + firstClose); ... Add solution -
C# 2021-10-03 03:38:05
c# IndexOf
// To find the index of the first substring in a string use // 'IndexOf()' string str = "Hello World!" str.IndexOf("o"); // Output: 4 // You can give a starting index and a length to search at str.IndexOf("o", 6, 4); // Outp... Add solution -
Html 2021-10-01 13:41:04
c# how to get src from html img
string str = "<div> <img src=\"https://i.testimg.com/images/g/test/s-l400.jpg\" style=\"width: 100%;\"> <div>Test</div> </div>"; // Get the index of where the value of src starts. int start = st... Add solution -
Dart 2021-09-29 07:19:02
i want number before % symbol in flutter
void main() { String str = "one.two"; print(str.replaceAll(".two", "")); // or print(str.split(".").first); // or String newStr = str.replaceRange(str.indexOf("."), str.length, ""... Add solution -
Java 2021-09-21 14:20:02
how to search for charecters in java
public class Test { public static void main(String args[]) { String str = new String("I81753490B9C/DQC"); int index = str.indexOf('DQC'); System.out.println("Index ... Add solution