doushi1473
doushi1473
2013-08-01 23:44
浏览 47

这个%s值是什么意思?

I'm just reading some code and I came across:

form method='post'
input type='hidden' name='input' value='%s'

What does the %s mean? I tried googling but I can't get an answer for this one.

图片转代码服务由CSDN问答提供 功能建议

我只是阅读了一些代码而我遇到了:

 <  code> form method ='post'
input type ='hidden'name ='input'value ='%s'
   
 
 

%是什么 s 是什么意思? 我试过谷歌搜索,但我无法得到这个答案。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • donglie1994
    donglie1994 2013-08-01 23:49

    %s most likely means a string. Sort of like a placeholder or variable.

    In some languages you can write something like:

    string name = "Joe";
    printf("Hi %s", name);
    

    Which would print out: "Hi Joe".

    点赞 评论
  • drsxzut183207938
    drsxzut183207938 2013-08-01 23:52

    %s is used in a programming technique called 'variable interpolation'.

    it will be replaced by a string somewhere later in the program

    点赞 评论

相关推荐