Here you can find the source of indentHtmlSpaces(int count)
Parameter | Description |
---|---|
count | The number of spaces. |
public static String indentHtmlSpaces(int count)
//package com.java2s; /**/*from w w w .j a va2 s .com*/ * TestTheTeacher. * Test the teacher to see whether he or she is really good enough at basing programming. * A project for a school of applied sciences. * * @author MingYan Li, Tim Visee * @copyright Copyright (c) MingYan Li & Tim Visee 2015. All rights reserved. * @license GNU GPL v3.0 */ public class Main { /** * Indent with HTML no break spaces. * * @param count The number of spaces. * * @return String with spaces. */ public static String indentHtmlSpaces(int count) { // Create a string builder for the spaces StringBuilder builder = new StringBuilder(); // Add the spaces for (int i = 0; i < count; i++) builder.append(" "); // Return the result return builder.toString(); } }