<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> <SCRIPT LANGUAGE="JavaScript"> <!-- var repeatLength = 10; var arr = new Array(repeatLength+1); document.writeln("|"+(arr).join("a").split("")+"|");
//output |a,a,a,a,a,a,a,a,a,a|
Array(6000).fill("0\r\n").toString(),
Array(6000).fill("-1\r\n").toString()
//--> </SCRIPT> </BODY> </HTML>
C#
public static string RepeatString(string str, int repeatCount) { return string.Join("",Enumerable.Repeat<string>(str, repeatCount)); //return new string(str[0], 10); }
Java
String strResult = TextUtils.join("#", arrayValue);
字符补齐
public static string PadRight(string str, int totalWidth, char paddingChar) { return str.PadRight(totalWidth, paddingChar); } public static string LeftRight(string str, int totalWidth, char paddingChar) { return str.PadLeft(totalWidth, paddingChar); } https://ideone.com/YjoyN4 Success #stdin #stdout 0.02s 22232KB //8 000001.0 Success #stdin #stdout 0.03s 22128KB //8 1.000000 Success #stdin #stdout 0.02s 16024KB //4 1.00
南来地,北往的,上班的,下岗的,走过路过不要错过!
======================个性签名=====================
之前认为Apple 的iOS 设计的要比 Android 稳定,我错了吗?
下载的许多客户端程序/游戏程序,经常会Crash,是程序写的不好(内存泄漏?刚启动也会吗?)还是iOS本身的不稳定!!!
如果在Android手机中可以简单联接到ddms,就可以查看系统log,很容易看到程序为什么出错,在iPhone中如何得知呢?试试Organizer吧,分析一下Device logs,也许有用.