[JAVA] 자릿수 만큼 0으로 채우기.. 예를 들어.. 3자리수를 표현한다고 하면, 001,002,010 뭐 이런식으로 표현하고 싶을때가 있다. (일련번호등을 표시할때 ) 아래와 같이 하면 쉽게 표현할 수 있다. int serial = 3; String suffix = String.format(“%03d”, serial); System.out.println(suffix); 결과는 “003” Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window) Related Posted on 2014-08-18 10:23 AM by andrew Comment 📂This entry was posted in JAVA 참고를 위한 저장물
2014-12-15 andrew CStirng ↔ char * (Unicode ↔ ANSI)※ Format 지정 가능 (CString → char *) // Static CString strText = _T("casting test"); char szText[128];...
2014-06-29 andrew Splitting a C++ std::string using tokens, e.g. “;” [duplicate]std::vector<std::string> split(const std::string& s,char seperator){ std::vector<std::s...