battle programmers alliance
Would you like to react to this message? Create an account in a few clicks or log in to continue.


battle programming a forum for elite programmers with extreme will power to sharpen theire skills
 
HomeSearchRegisterLog in
 

 [java] nested forum spoiler

Go down 
AuthorMessage
kurosen
codding
codding
kurosen

Posts : 228
Join date : 2012-04-17

[java] nested forum spoiler Empty
PostSubject: [java] nested forum spoiler   [java] nested forum spoiler EmptySat Oct 17, 2020 11:59 am

Code:
package chobit;

public class ForumSpoiler {
   public static void ForumSpoiler(String msgFiller, String msg, int spoilers) {
      String s1 = String.format("[SPOILER=\"%s\"]", msgFiller);
      for (int i = 0; i < spoilers; i++) {
         System.out.print(s1);
      }
      System.out.print(msg);
      for (int i = 0; i < spoilers; i++) {
         System.out.print("[/SPOILER]");
      }
   }
}

Back to top Go down
 
[java] nested forum spoiler
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
battle programmers alliance :: battle programming alliance :: battle programming-
Jump to: