Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* code dimensions */
- import String;
- import Array;
- class Main {
- static public function main() {
- var code = "Je suis\nun\ncode dans un langage\nobscure";
- var w = 0,h;
- var ssplit = code.split("\n");
- ssplit.map(function(s:String) {
- if(s.length > w) {
- w = s.length;
- }
- });
- h = ssplit.length;
- trace("width : ", w, "height : ", h);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment