vendredi 13 février 2015

Making a name generator in Java that limits the amount of generated characters to 12, but doesn't cutt off words?

Very hard to explain what I'm looking for, but I'll try my best. Let me first start off by saying I am pretty new to java.


I am looking for a way to make a random name generator, that will limit the amount of characters the generated string will have to 12.


For example, I have a String "Dragon" and another String "killer13". That has 14 characters if they get matched randomly. I want it to choose names that will fit 2 full Strings into a name under 12 characters total. So I dont want to get "Dragonkiller" if "Dragon" and "killer13" are matched together because it cut off the last two characters of "killer13". Am I making sense? I'll try to explain further if you have any questions. Thanks guys!


Aucun commentaire:

Enregistrer un commentaire