Uncrustify和/或Universal Indent GUI可以拆分字符串文字吗?

时间:2012-10-31 12:06:38

标签: c++ uncrustify universalindentgui

我正在使用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;

这可以通过提到的辅助工具来实现吗?

提前致谢...

1 个答案:

答案 0 :(得分:-2)

myLog << "Long log message which exceeds " \
         "line width."
      << std::endmsg;