当前位置: 动力学知识库 > 问答 > 编程问答 >

iphone - implementation methods to interface xcode script

问题描述:

I would like to ask if somebody has some user script to copy all implementation methods definitions to the clipboard that can be pasted to the header definitions.

网友答案:

Create a new new userscript with the input set as Entire Document and the output set as Place on Clipboard. Then past the code below in...

#!/usr/bin/env ruby

text = $stdin.read

for method in text.scan(/\s*([+-]\s*\([^\)]+\)[^\{]+)/)
    puts method[0].strip + ";"
end
分享给朋友:
您可能感兴趣的文章:
随机阅读: