Rev 2071 | Rev 2272 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2071 | Rev 2125 | ||
---|---|---|---|
Line 113... | Line 113... | ||
113 | 113 | ||
114 | for(i=0; i<cnt; i++) |
114 | for (i = 0; i < cnt; i++) |
115 | p[i] = x; |
115 | p[i] = x; |
116 | } |
116 | } |
117 | 117 | ||
- | 118 | /** Copy string |
|
- | 119 | * |
|
- | 120 | * Copy string from src address to dst address. |
|
- | 121 | * The copying is done char-by-char until the null |
|
- | 122 | * character. The source and destination memory areas |
|
- | 123 | * cannot overlap. |
|
- | 124 | * |
|
- | 125 | * @param src Origin string to copy from. |
|
- | 126 | * @param dst Origin string to copy to. |
|
- | 127 | * |
|
- | 128 | */ |
|
- | 129 | char *strcpy(char *dest, const char *src) |
|
- | 130 | { |
|
- | 131 | char *orig = dest; |
|
- | 132 | ||
- | 133 | while ((*(dest++) = *(src++))); |
|
- | 134 | return orig; |
|
- | 135 | } |
|
- | 136 | ||
118 | /** @} |
137 | /** @} |
119 | */ |
138 | */ |