Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

replace string in dart,replace string in dart using regex

var greetingTemplate = 'Hello, NAME!';
var greeting =
    greetingTemplate.replaceAll(RegExp('NAME'), 'Bob');

// greetingTemplate didn't change.
assert(greeting != greetingTemplate);
Source by dart.dev #
 
PREVIOUS NEXT
Tagged: #replace #string #string #dart #regex
ADD COMMENT
Topic
Name
3+8 =