惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 【当耐特】
爱范儿
爱范儿
博客园 - 聂微东
美团技术团队
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
云风的 BLOG
云风的 BLOG
罗磊的独立博客
V
Visual Studio Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
V
V2EX
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

博客园 - 丁丁

Running Knoppix 6.7.1 in a Sandisk Ultra flash drive to do GAE programming via PyCharm Fast fill huge number of same value to below cells in Excel How to install Windows 7 on the 6 years IBM X60 notebook Python 2.5 SSL package version 1.15 for GAE A GAE based blog, Micolog 7.412 with Django 1.2 enable Price compare: Sina App Engine vs Google App Engine IE9 is a little faster than Firefox6 in Speed Reading performance test but so less SDLC (Systems Development Life Cycle) Brief Terminology & Workflow 成功凤凰刷机刷出诺基亚E5系统版本042.014纯净简体中文版 How to using Windows Live Writer on umbraco - 丁丁 用PowerShell强制添加IE本身无法添加的RSS Feeds Getting Help on WMI Methods - 丁丁 [PowerShell]One line to pack individual PDF file into their BaseName.RAR - 丁丁 My first time meet ORA-600 error, quite memorable moment. Camstar InSite 3 server transaction log file profiler, source code included Setting up the Matlab Database Toolbox to connecting to Oracle DB 在Ubuntu 8.04 x86_64上安装Oracle 10g XE和Oracle Application Express(apex) 3.1.1 合并不同WebService之间的相同对象类型 究竟何时买房才最合适?写于2008年3月
代码小片断,自动对文本分行的C#函数
丁丁 · 2008-02-01 · via 博客园 - 丁丁

相当简单的C#函数实现代码片断,按照最小行长度分行和断行(会超过最小行长度),曾用于自动给太长的Winform Tooltip断行。

private string MultiplineString(string instr, int line_length)
{
    
string remain = instr, multi_line="";
    
while(remain.Length > line_length)
    {
        
int space_pos = remain.IndexOf(' ', line_length);
        
if (space_pos == -1)
            
break;
        multi_line 
+= remain.Substring(0, space_pos) + "\r\n";
        remain 
= remain.Substring(space_pos + 1);
    }
    
return multi_line + remain;
}