xxxxxxxxxx
var fs = require('fs');
for (var i = 0; i < 27; i++) {
var json = {}
json.name = "Token #" + i;
json.description = "This is the description for token #" + i;
json.image = "ipfs://CHANGE TO YOUR IMAGES CID/" + i + ".png";
fs.writeFileSync('' + i, JSON.stringify(json));
}
Convert input to lowercase,
Split input on spaces,
Remove any empty values,
Convert all elements to buffers so they are mutable,
Replace the first character of each element with it's uppercase varient,
Convert the buffers back to strings,
Join the elements back to one variable.
xxxxxxxxxx
public static final String convertToTitleCase(final String input) {
return Arrays.stream(input.toLowerCase().split(" "))
.filter(not(String::isEmpty))
.map(StringBuffer::new)
.peek(s -> s.setCharAt(0, toTitleCase(s.charAt(0))))
.map(StringBuffer::toString)
.collect(Collectors.joining(" "));
}