我正在使用Universal Indent GUI和Uncrustify来完成我的C ++项目。代码宽度设置为80个字符,代码格式几乎令人满意。这似乎适用于常规代码,但字符串文字不会拆分,我希望这也会发生。
以下示例演示了我正在尝试实现...
原件:
Logger myLog;
myLog << "Long log message which exceeds line width." << std::endmsg;
Beautifed(align_left_shift = true):
Logger myLog;
myLog <<
"Long log message which exceeds line width."
<< std::endmsg;
优选:
Logger myLog;
myLog << "Long log message which exceeds "
"line width."
<< std::endmsg;
// or
myLog << "Long log message which exceeds "
"line width." << std::endmsg;
这可以通过提到的辅助工具来实现吗?
提前致谢...
答案 0 :(得分:-2)
myLog << "Long log message which exceeds " \
"line width."
<< std::endmsg;