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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
月光博客
月光博客
量子位
博客园 - 司徒正美
V
V2EX
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
N
Netflix TechBlog - Medium
L
LangChain Blog
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog

博客园 - 丁丁

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;
}